X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fhwmon%2Fw83791d.c;h=85077c4c8039faba7499e51e6d03d5d0c6f2f0ec;hb=3cb2cea15e707dd030b3293d6d08183da369d291;hp=b6f2ebf9f9cf54e4648c8772856bbd4f0952d0a7;hpb=4fa435018d740cb83d74c92306aa1f796da91ddd;p=linux-2.6 diff --git a/drivers/hwmon/w83791d.c b/drivers/hwmon/w83791d.c index b6f2ebf9f9..85077c4c80 100644 --- a/drivers/hwmon/w83791d.c +++ b/drivers/hwmon/w83791d.c @@ -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; }