]> err.no Git - linux-2.6/blobdiff - drivers/hwmon/lm83.c
[PATCH] sky2: transmit recovery
[linux-2.6] / drivers / hwmon / lm83.c
index 5b78d19693e8d693ec173475f2426837bff809a7..26dfa9e216c2814f9419b318ed8289e46f6b8a21 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/slab.h>
 #include <linux/jiffies.h>
 #include <linux/i2c.h>
-#include <linux/i2c-sensor.h>
 #include <linux/hwmon-sysfs.h>
 #include <linux/hwmon.h>
 #include <linux/err.h>
@@ -52,7 +51,7 @@ static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a,
  * Insmod parameters
  */
 
-SENSORS_INSMOD_1(lm83);
+I2C_CLIENT_INSMOD_1(lm83);
 
 /*
  * The LM83 registers
@@ -125,10 +124,10 @@ static struct lm83_data *lm83_update_device(struct device *dev);
  */
  
 static struct i2c_driver lm83_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "lm83",
+       .driver = {
+               .name   = "lm83",
+       },
        .id             = I2C_DRIVERID_LM83,
-       .flags          = I2C_DF_NOTIFY,
        .attach_adapter = lm83_attach_adapter,
        .detach_client  = lm83_detach_client,
 };
@@ -231,11 +230,10 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, int kind)
        if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
                goto exit;
 
-       if (!(data = kmalloc(sizeof(struct lm83_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct lm83_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit;
        }
-       memset(data, 0, sizeof(struct lm83_data));
 
        /* The common I2C client data is placed right after the
         * LM83-specific data. */