mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-18 11:09:32 +00:00
Only use __exit in 2.4.xx and later kernels.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1457 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
5ef460df5c
commit
9d559f9ce1
2 files changed
+14
No files matched your search
@@ -317,12 +317,16 @@ static int ds1307_command (struct i2c_client *client,unsigned int cmd,void *arg)
|
||||
|
||||
static void ds1307_inc_use (struct i2c_client *client)
|
||||
{
|
||||
#ifdef MODULE
|
||||
MOD_INC_USE_COUNT;
|
||||
#endif /* #ifdef MODULE */
|
||||
}
|
||||
|
||||
static void ds1307_dec_use (struct i2c_client *client)
|
||||
{
|
||||
#ifdef MODULE
|
||||
MOD_DEC_USE_COUNT;
|
||||
#endif /* #ifdef MODULE */
|
||||
}
|
||||
|
||||
static struct i2c_driver ds1307 = {
|
||||
@@ -348,6 +352,11 @@ static int __init ds1307_init (void)
|
||||
return (0);
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
|
||||
#undef __exit
|
||||
#define __exit
|
||||
#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) */
|
||||
|
||||
static void __exit ds1307_exit (void)
|
||||
{
|
||||
i2c_del_driver (&ds1307);
|
||||
|
||||
@@ -406,6 +406,11 @@ static int __init sensors_lm92_init (void)
|
||||
return (0);
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
|
||||
#undef __exit
|
||||
#define __exit
|
||||
#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) */
|
||||
|
||||
static void __exit sensors_lm92_exit (void)
|
||||
{
|
||||
i2c_del_driver (&lm92_driver);
|
||||
|
||||
Reference in new issue
Block a user