X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fhwmon%2Flm87.c;h=e1c183f0aae0b8c70cd16066548d2ee2c7fca082;hb=ac7c5353b189e10cf5dd27399f64f7b013abffc6;hp=7bedf7455e9a084e4af05dd5b5ef65a302c67e41;hpb=7b501b1f53605bec17454dd8bbdbbf3f57a7cf32;p=linux-2.6 diff --git a/drivers/hwmon/lm87.c b/drivers/hwmon/lm87.c index 7bedf7455e..e1c183f0aa 100644 --- a/drivers/hwmon/lm87.c +++ b/drivers/hwmon/lm87.c @@ -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; }