]> err.no Git - linux-2.6/blobdiff - drivers/hwmon/gl520sm.c
[PATCH] m68k: NULL noise removal
[linux-2.6] / drivers / hwmon / gl520sm.c
index de6608a159c3724f992de6b756995fdb20a277c2..baee60e44b521c25ca5f0fe1009503759ea3fe38 100644 (file)
@@ -26,8 +26,8 @@
 #include <linux/slab.h>
 #include <linux/jiffies.h>
 #include <linux/i2c.h>
-#include <linux/i2c-vid.h>
 #include <linux/hwmon.h>
+#include <linux/hwmon-vid.h>
 #include <linux/err.h>
 
 /* Type of the extra sensor */
@@ -109,10 +109,10 @@ static struct gl520_data *gl520_update_device(struct device *dev);
 
 /* Driver data */
 static struct i2c_driver gl520_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "gl520sm",
+       .driver = {
+               .name   = "gl520sm",
+       },
        .id             = I2C_DRIVERID_GL520,
-       .flags          = I2C_DF_NOTIFY,
        .attach_adapter = gl520_attach_adapter,
        .detach_client  = gl520_detach_client,
 };
@@ -536,11 +536,10 @@ static int gl520_detect(struct i2c_adapter *adapter, int address, int kind)
           client structure, even though we cannot fill it completely yet.
           But it allows us to access gl520_{read,write}_value. */
 
-       if (!(data = kmalloc(sizeof(struct gl520_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct gl520_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit;
        }
-       memset(data, 0, sizeof(struct gl520_data));
 
        new_client = &data->client;
        i2c_set_clientdata(new_client, data);
@@ -617,7 +616,7 @@ static void gl520_init_client(struct i2c_client *client)
        conf = oldconf = gl520_read_value(client, GL520_REG_CONF);
 
        data->alarm_mask = 0xff;
-       data->vrm = i2c_which_vrm();
+       data->vrm = vid_which_vrm();
 
        if (extra_sensor_type == 1)
                conf &= ~0x10;