diff --git a/kernel/chips/ds1307.c b/kernel/chips/ds1307.c index 2f1f40b2..be3d6ac3 100644 --- a/kernel/chips/ds1307.c +++ b/kernel/chips/ds1307.c @@ -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); diff --git a/kernel/chips/lm92.c b/kernel/chips/lm92.c index 2cf6f304..784c1cc3 100644 --- a/kernel/chips/lm92.c +++ b/kernel/chips/lm92.c @@ -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);