]> err.no Git - linux-2.6/blobdiff - drivers/hwmon/lm87.c
Merge branch 'linux-2.6'
[linux-2.6] / drivers / hwmon / lm87.c
index 7bedf7455e9a084e4af05dd5b5ef65a302c67e41..e1c183f0aae0b8c70cd16066548d2ee2c7fca082 100644 (file)
@@ -73,7 +73,7 @@
  * LM87 has three possible addresses: 0x2c, 0x2d and 0x2e.
  */
 
-static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
+static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
 
 /*
  * Insmod parameters
@@ -510,8 +510,7 @@ static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char
 }
 static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
 {
-       struct i2c_client *client = to_i2c_client(dev);
-       struct lm87_data *data = i2c_get_clientdata(client);
+       struct lm87_data *data = dev_get_drvdata(dev);
        data->vrm = simple_strtoul(buf, NULL, 10);
        return count;
 }