]> err.no Git - linux-2.6/blobdiff - drivers/hwmon/fscpos.c
[PATCH] alloc_buffer_head() and free_buffer_head() cleanup
[linux-2.6] / drivers / hwmon / fscpos.c
index fd75e444e7580ccb47fc48f4860ff0f54b7063dd..5fc77a5fed07b4b25d8fc21d27e22cc55a6a71a9 100644 (file)
@@ -34,7 +34,6 @@
 #include <linux/slab.h>
 #include <linux/jiffies.h>
 #include <linux/i2c.h>
-#include <linux/i2c-sensor.h>
 #include <linux/init.h>
 #include <linux/hwmon.h>
 #include <linux/err.h>
@@ -47,7 +46,7 @@ static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
 /*
  * Insmod parameters
  */
-SENSORS_INSMOD_1(fscpos);
+I2C_CLIENT_INSMOD_1(fscpos);
 
 /*
  * The FSCPOS registers
@@ -436,7 +435,7 @@ static int fscpos_attach_adapter(struct i2c_adapter *adapter)
 {
        if (!(adapter->class & I2C_CLASS_HWMON))
                return 0;
-       return i2c_detect(adapter, &addr_data, fscpos_detect);
+       return i2c_probe(adapter, &addr_data, fscpos_detect);
 }
 
 int fscpos_detect(struct i2c_adapter *adapter, int address, int kind)
@@ -549,11 +548,8 @@ static int fscpos_detach_client(struct i2c_client *client)
 
        hwmon_device_unregister(data->class_dev);
 
-       if ((err = i2c_detach_client(client))) {
-               dev_err(&client->dev, "Client deregistration failed, client"
-                                                       " not detached.\n");
+       if ((err = i2c_detach_client(client)))
                return err;
-       }
        kfree(data);
        return 0;
 }