]> err.no Git - linux-2.6/blobdiff - drivers/hwmon/w83781d.c
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[linux-2.6] / drivers / hwmon / w83781d.c
index f269faeffa47c102ede3bb0086e09873a509929c..9265f32122fa4b59d072b98134c18bf383fb57d0 100644 (file)
@@ -39,9 +39,8 @@
 #include <linux/jiffies.h>
 #include <linux/i2c.h>
 #include <linux/i2c-isa.h>
-#include <linux/i2c-sensor.h>
-#include <linux/i2c-vid.h>
 #include <linux/hwmon.h>
+#include <linux/hwmon-vid.h>
 #include <linux/err.h>
 #include <asm/io.h>
 #include "lm75.h"
@@ -53,7 +52,7 @@ static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
 static unsigned short isa_address = 0x290;
 
 /* Insmod parameters */
-SENSORS_INSMOD_5(w83781d, w83782d, w83783s, w83627hf, as99127f);
+I2C_CLIENT_INSMOD_5(w83781d, w83782d, w83783s, w83627hf, as99127f);
 I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: "
                    "{bus, clientaddr, subclientaddr1, subclientaddr2}");
 
@@ -890,12 +889,11 @@ w83781d_detect_subclients(struct i2c_adapter *adapter, int address, int kind,
        const char *client_name = "";
        struct w83781d_data *data = i2c_get_clientdata(new_client);
 
-       data->lm75[0] = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
+       data->lm75[0] = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
        if (!(data->lm75[0])) {
                err = -ENOMEM;
                goto ERROR_SC_0;
        }
-       memset(data->lm75[0], 0x00, sizeof (struct i2c_client));
 
        id = i2c_adapter_id(adapter);
 
@@ -920,13 +918,11 @@ w83781d_detect_subclients(struct i2c_adapter *adapter, int address, int kind,
        }
 
        if (kind != w83783s) {
-
-               data->lm75[1] = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
+               data->lm75[1] = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
                if (!(data->lm75[1])) {
                        err = -ENOMEM;
                        goto ERROR_SC_1;
                }
-               memset(data->lm75[1], 0x0, sizeof(struct i2c_client));
 
                if (force_subclients[0] == id &&
                    force_subclients[1] == address) {
@@ -1065,11 +1061,10 @@ w83781d_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 w83781d_{read,write}_value. */
 
-       if (!(data = kmalloc(sizeof(struct w83781d_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct w83781d_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto ERROR1;
        }
-       memset(data, 0, sizeof(struct w83781d_data));
 
        new_client = &data->client;
        i2c_set_clientdata(new_client, data);
@@ -1452,7 +1447,6 @@ w83781d_write_value(struct i2c_client *client, u16 reg, u16 value)
        return 0;
 }
 
-/* Called when we have found a new W83781D. It should set limits, etc. */
 static void
 w83781d_init_client(struct i2c_client *client)
 {
@@ -1479,7 +1473,7 @@ w83781d_init_client(struct i2c_client *client)
                w83781d_write_value(client, W83781D_REG_BEEP_INTS2, 0);
        }
 
-       data->vrm = i2c_which_vrm();
+       data->vrm = vid_which_vrm();
 
        if ((type != w83781d) && (type != as99127f)) {
                tmp = w83781d_read_value(client, W83781D_REG_SCFG1);