]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/hwmon/lm92.c
[PATCH] v4l: 888: saa7113 renamed to saa711x
[karo-tx-linux.git] / drivers / hwmon / lm92.c
index 9740ee264051ef5f3a0e5ebf99431999e91a7ece..7a4b3701ed1a5c0fec354a9739f9a92954059bc4 100644 (file)
@@ -44,7 +44,6 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
-#include <linux/i2c-sensor.h>
 #include <linux/hwmon.h>
 #include <linux/err.h>
 
@@ -54,7 +53,7 @@ static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
                                       I2C_CLIENT_END };
 
 /* Insmod parameters */
-SENSORS_INSMOD_1(lm92);
+I2C_CLIENT_INSMOD_1(lm92);
 
 /* The LM92 registers */
 #define LM92_REG_CONFIG                        0x01 /* 8-bit, RW */
@@ -301,11 +300,10 @@ static int lm92_detect(struct i2c_adapter *adapter, int address, int kind)
                                            | I2C_FUNC_SMBUS_WORD_DATA))
                goto exit;
 
-       if (!(data = kmalloc(sizeof(struct lm92_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct lm92_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit;
        }
-       memset(data, 0, sizeof(struct lm92_data));
 
        /* Fill in enough client fields so that we can read from the chip,
           which is required for identication */
@@ -389,7 +387,7 @@ static int lm92_attach_adapter(struct i2c_adapter *adapter)
 {
        if (!(adapter->class & I2C_CLASS_HWMON))
                return 0;
-       return i2c_detect(adapter, &addr_data, lm92_detect);
+       return i2c_probe(adapter, &addr_data, lm92_detect);
 }
 
 static int lm92_detach_client(struct i2c_client *client)