]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/hwmon/adm1021.c
[PATCH] hwmon: Discard explicit static initializations to 0
[mv-sheeva.git] / drivers / hwmon / adm1021.c
index 2a341390d92ec0c9b17f276bf1c92991ce704158..58aee3a00caaa087468c3f97a420e9623ae517e0 100644 (file)
@@ -24,7 +24,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>
 
@@ -36,7 +35,7 @@ static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a,
                                        I2C_CLIENT_END };
 
 /* Insmod parameters */
-SENSORS_INSMOD_8(adm1021, adm1023, max1617, max1617a, thmc10, lm84, gl523sm, mc1066);
+I2C_CLIENT_INSMOD_8(adm1021, adm1023, max1617, max1617a, thmc10, lm84, gl523sm, mc1066);
 
 /* adm1021 constants specified below */
 
@@ -122,7 +121,7 @@ static int adm1021_write_value(struct i2c_client *client, u8 reg,
 static struct adm1021_data *adm1021_update_device(struct device *dev);
 
 /* (amalysh) read only mode, otherwise any limit's writing confuse BIOS */
-static int read_only = 0;
+static int read_only;
 
 
 /* This is the driver that will be inserted */
@@ -187,7 +186,7 @@ static int adm1021_attach_adapter(struct i2c_adapter *adapter)
 {
        if (!(adapter->class & I2C_CLASS_HWMON))
                return 0;
-       return i2c_detect(adapter, &addr_data, adm1021_detect);
+       return i2c_probe(adapter, &addr_data, adm1021_detect);
 }
 
 static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind)
@@ -328,10 +327,8 @@ static int adm1021_detach_client(struct i2c_client *client)
 
        hwmon_device_unregister(data->class_dev);
 
-       if ((err = i2c_detach_client(client))) {
-               dev_err(&client->dev, "Client deregistration failed, client not detached.\n");
+       if ((err = i2c_detach_client(client)))
                return err;
-       }
 
        kfree(data);
        return 0;