Merge branch 'drm-forlinus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[pandora-kernel.git] / drivers / hwmon / lm87.c
index af16120..6ba34c3 100644 (file)
@@ -57,9 +57,8 @@
 #include <linux/slab.h>
 #include <linux/jiffies.h>
 #include <linux/i2c.h>
-#include <linux/i2c-sensor.h>
-#include <linux/i2c-vid.h>
 #include <linux/hwmon.h>
+#include <linux/hwmon-vid.h>
 #include <linux/err.h>
 
 /*
@@ -73,7 +72,7 @@ static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
  * Insmod parameters
  */
 
-SENSORS_INSMOD_1(lm87);
+I2C_CLIENT_INSMOD_1(lm87);
 
 /*
  * The LM87 registers
@@ -162,10 +161,10 @@ static struct lm87_data *lm87_update_device(struct device *dev);
  */
 
 static struct i2c_driver lm87_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "lm87",
+       .driver = {
+               .name   = "lm87",
+       },
        .id             = I2C_DRIVERID_LM87,
-       .flags          = I2C_DF_NOTIFY,
        .attach_adapter = lm87_attach_adapter,
        .detach_client  = lm87_detach_client,
 };
@@ -555,11 +554,10 @@ static int lm87_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 lm87_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct lm87_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit;
        }
-       memset(data, 0, sizeof(struct lm87_data));
 
        /* The common I2C client data is placed right before the
           LM87-specific data. */
@@ -695,7 +693,7 @@ static void lm87_init_client(struct i2c_client *client)
        u8 config;
 
        data->channel = lm87_read_value(client, LM87_REG_CHANNEL_MODE);
-       data->vrm = i2c_which_vrm();
+       data->vrm = vid_which_vrm();
 
        config = lm87_read_value(client, LM87_REG_CONFIG);
        if (!(config & 0x01)) {