diff --git a/kernel/chips/lm75.c b/kernel/chips/lm75.c index 6a484e33..2d7303f2 100644 --- a/kernel/chips/lm75.c +++ b/kernel/chips/lm75.c @@ -251,6 +251,12 @@ int lm75_detach_client(struct i2c_client *client) { int err; +#ifdef MODULE + if (MOD_IN_USE) + return -EBUSY; +#endif + + sensors_deregister_entry(((struct lm75_data *) (client->data))-> sysctl_id); diff --git a/kernel/chips/w83781d.c b/kernel/chips/w83781d.c index 7e16124c..d6e40f33 100644 --- a/kernel/chips/w83781d.c +++ b/kernel/chips/w83781d.c @@ -992,7 +992,7 @@ int w83781d_detach_client(struct i2c_client *client) (((struct w83781d_data *) (client->data))-> lm75[0])); - if((((struct w83781d_data *) (client->data))->type) != w83783s); + if((((struct w83781d_data *) (client->data))->type) != w83783s) i2c_detach_client(& (((struct w83781d_data *) (client->data))->