Merge branches 'release', 'ejd', 'sony' and 'wmi' into release
[sfrench/cifs-2.6.git] / drivers / hwmon / w83791d.c
index b6f2ebf9f9cf54e4648c8772856bbd4f0952d0a7..85077c4c8039faba7499e51e6d03d5d0c6f2f0ec 100644 (file)
@@ -47,7 +47,8 @@
 #define NUMBER_OF_TEMPIN       3
 
 /* Addresses to scan */
-static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END };
+static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f,
+                                               I2C_CLIENT_END };
 
 /* Insmod parameters */
 I2C_CLIENT_INSMOD_1(w83791d);
@@ -840,14 +841,12 @@ static ssize_t store_vrm_reg(struct device *dev,
                                struct device_attribute *attr,
                                const char *buf, size_t count)
 {
-       struct i2c_client *client = to_i2c_client(dev);
-       struct w83791d_data *data = i2c_get_clientdata(client);
-       unsigned long val = simple_strtoul(buf, NULL, 10);
+       struct w83791d_data *data = dev_get_drvdata(dev);
 
        /* No lock needed as vrm is internal to the driver
           (not read from a chip register) and so is not
           updated in w83791d_update_device() */
-       data->vrm = val;
+       data->vrm = simple_strtoul(buf, NULL, 10);
 
        return count;
 }
@@ -1096,7 +1095,7 @@ static int w83791d_detect(struct i2c_adapter *adapter, int address, int kind)
        if (kind == w83791d) {
                client_name = "w83791d";
        } else {
-               dev_err(dev, "w83791d: Internal error: unknown kind (%d)?!?",
+               dev_err(dev, "w83791d: Internal error: unknown kind (%d)?!?\n",
                        kind);
                goto error1;
        }