]> err.no Git - linux-2.6/blobdiff - drivers/hwmon/fscher.c
V4L/DVB (3502): Saa7134: make unsupported secondary decoder message generic
[linux-2.6] / drivers / hwmon / fscher.c
index 5629e68a5ca309ea0b1e0430c8fb92a19dfd134b..25409181d1eb87940ef69f6166cd46f4f7ff9678 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/slab.h>
 #include <linux/jiffies.h>
 #include <linux/i2c.h>
-#include <linux/i2c-sensor.h>
 #include <linux/hwmon.h>
 #include <linux/err.h>
 
@@ -45,7 +44,7 @@ static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
  * Insmod parameters
  */
 
-SENSORS_INSMOD_1(fscher);
+I2C_CLIENT_INSMOD_1(fscher);
 
 /*
  * The FSCHER registers
@@ -119,10 +118,10 @@ static int fscher_write_value(struct i2c_client *client, u8 reg, u8 value);
  */
  
 static struct i2c_driver fscher_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "fscher",
+       .driver = {
+               .name   = "fscher",
+       },
        .id             = I2C_DRIVERID_FSCHER,
-       .flags          = I2C_DF_NOTIFY,
        .attach_adapter = fscher_attach_adapter,
        .detach_client  = fscher_detach_client,
 };
@@ -304,11 +303,10 @@ static int fscher_detect(struct i2c_adapter *adapter, int address, int kind)
        /* OK. For now, we presume we have a valid client. We now create the
         * client structure, even though we cannot fill it completely yet.
         * But it allows us to access i2c_smbus_read_byte_data. */
-       if (!(data = kmalloc(sizeof(struct fscher_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct fscher_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit;
        }
-       memset(data, 0, sizeof(struct fscher_data));
 
        /* The common I2C client data is placed right before the
         * Hermes-specific data. */