X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fhwmon%2Fadm1029.c;h=2c6608d453c27b76321c5728b85621ac7ccb0efb;hb=4cb4f22b19237e63c460c53fbd1c417cdaf63014;hp=73ce31b31511690855d4110d9bf0a5835324b34e;hpb=5a84d159061d914c8dd4aa372ac6e9529c2be453;p=linux-2.6-omap-h63xx.git diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c index 73ce31b3151..2c6608d453c 100644 --- a/drivers/hwmon/adm1029.c +++ b/drivers/hwmon/adm1029.c @@ -39,10 +39,8 @@ * Addresses to scan */ -static unsigned short normal_i2c[] = { - 0x28, 0x29, 0x2a, - 0x2b, 0x2c, 0x2d, - 0x2e, 0x2f, I2C_CLIENT_END +static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, + 0x2e, 0x2f, I2C_CLIENT_END }; /* @@ -141,7 +139,7 @@ static struct i2c_driver adm1029_driver = { struct adm1029_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 */ @@ -391,9 +389,9 @@ static int adm1029_detect(struct i2c_adapter *adapter, int address, int kind) if ((err = sysfs_create_group(&client->dev.kobj, &adm1029_group))) goto exit_detach; - data->class_dev = hwmon_device_register(&client->dev); - if (IS_ERR(data->class_dev)) { - err = PTR_ERR(data->class_dev); + data->hwmon_dev = hwmon_device_register(&client->dev); + if (IS_ERR(data->hwmon_dev)) { + err = PTR_ERR(data->hwmon_dev); goto exit_remove_files; } @@ -431,7 +429,7 @@ static int adm1029_detach_client(struct i2c_client *client) struct adm1029_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, &adm1029_group); if ((err = i2c_detach_client(client)))