mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-11 17:12:32 +07:00
* Improved monitoring of /proc directories
Instead of doing:
proc_bus_i2c->fill_inode = &monitor_bus_i2c;
void monitor_bus_i2c(struct inode *inode, int fill)
{
if (fill)
MOD_INC_USE_COUNT;
else
MOD_DEC_USE_COUNT;
}
you can now simply set:
proc_bus_i2c->owner = THIS_MODULE;
and this is just as good!
* An old 2.3 problem seemingly never was resolved yet: instead of using
a *wait_queue directly, you have to use a wait_queue_head_t and
initialize it properly:
#if (LINUX_VERSION_CODE < 0x020301)
static struct wait_queue *pcf_wait = NULL;
#else
static wait_queue_head_t pcf_wait;
#endif
#if (LINUX_VERSION_CODE >= 0x020301)
init_waitqueue_head(&pcf_wait);
#endif
except for this, semantics remain the same (but using a plain
wait_queue_head_t instead of a pointer to a wait_queue)
* I had to change the semantics of sensors_register_entry slightly,
to make the monitoring of /proc/sys/dev/* files possible for kernels
2.3.27 and newer. It now takes an additional parameter, which you
can specify as THIS_MODULE.
* THIS_MODULE is only defined in kernels 2.3.13 and later; added
it to compat.h and the compatibility section of mkpatch.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@640 7894878c-1315-0410-8ee3-d5d059ff63e0