X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fhwmon%2Flm83.c;h=6a8642fa25fbd3850b287c712544a524397b83d8;hb=803a8d2acbf220aeb27f0a98dacb36d4af3d6559;hp=654c0f73464d3f502f566d72e71626dd664914ea;hpb=3e1f900bff40460d7bbab0ccd1a9efc3c70aee49;p=linux-2.6 diff --git a/drivers/hwmon/lm83.c b/drivers/hwmon/lm83.c index 654c0f7346..6a8642fa25 100644 --- a/drivers/hwmon/lm83.c +++ b/drivers/hwmon/lm83.c @@ -48,10 +48,8 @@ * addresses. */ -static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a, - 0x29, 0x2a, 0x2b, - 0x4c, 0x4d, 0x4e, - I2C_CLIENT_END }; +static const unsigned short normal_i2c[] = { + 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e, I2C_CLIENT_END }; /* * Insmod parameters @@ -133,7 +131,6 @@ static struct i2c_driver lm83_driver = { .driver = { .name = "lm83", }, - .id = I2C_DRIVERID_LM83, .attach_adapter = lm83_attach_adapter, .detach_client = lm83_detach_client, }; @@ -144,7 +141,7 @@ static struct i2c_driver lm83_driver = { struct lm83_data { struct i2c_client client; - struct class_device *class_dev; + struct device *hwmon_dev; struct mutex update_lock; char valid; /* zero until following fields are valid */ unsigned long last_updated; /* in jiffies */ @@ -400,9 +397,9 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, int kind) goto exit_remove_files; } - data->class_dev = hwmon_device_register(&new_client->dev); - if (IS_ERR(data->class_dev)) { - err = PTR_ERR(data->class_dev); + data->hwmon_dev = hwmon_device_register(&new_client->dev); + if (IS_ERR(data->hwmon_dev)) { + err = PTR_ERR(data->hwmon_dev); goto exit_remove_files; } @@ -424,7 +421,7 @@ static int lm83_detach_client(struct i2c_client *client) struct lm83_data *data = i2c_get_clientdata(client); int err; - hwmon_device_unregister(data->class_dev); + hwmon_device_unregister(data->hwmon_dev); sysfs_remove_group(&client->dev.kobj, &lm83_group); sysfs_remove_group(&client->dev.kobj, &lm83_group_opt);