X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fhwmon%2Fmax6650.c;h=52d528b76cc32f8adfa68375f2da0509c09a8251;hb=66d715c95a39e84cd25204a665915621457d9691;hp=8415664f33c2cf42f24987a56a39dc5792026e34;hpb=9b6a51746ffe8d619f1097675d2dc5e303470024;p=linux-2.6 diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c index 8415664f33..52d528b76c 100644 --- a/drivers/hwmon/max6650.c +++ b/drivers/hwmon/max6650.c @@ -44,7 +44,8 @@ * Addresses to scan. There are four disjoint possibilities, by pin config. */ -static unsigned short normal_i2c[] = {0x1b, 0x1f, 0x48, 0x4b, I2C_CLIENT_END}; +static const unsigned short normal_i2c[] = {0x1b, 0x1f, 0x48, 0x4b, + I2C_CLIENT_END}; /* * Insmod parameters @@ -128,7 +129,7 @@ static struct i2c_driver max6650_driver = { struct max6650_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 */ @@ -523,11 +524,11 @@ static int max6650_detect(struct i2c_adapter *adapter, int address, int kind) if (err) goto err_detach; - data->class_dev = hwmon_device_register(&client->dev); - if (!IS_ERR(data->class_dev)) + data->hwmon_dev = hwmon_device_register(&client->dev); + if (!IS_ERR(data->hwmon_dev)) return 0; - err = PTR_ERR(data->class_dev); + err = PTR_ERR(data->hwmon_dev); dev_err(&client->dev, "error registering hwmon device.\n"); sysfs_remove_group(&client->dev.kobj, &max6650_attr_grp); err_detach: @@ -543,7 +544,7 @@ static int max6650_detach_client(struct i2c_client *client) int err; sysfs_remove_group(&client->dev.kobj, &max6650_attr_grp); - hwmon_device_unregister(data->class_dev); + hwmon_device_unregister(data->hwmon_dev); err = i2c_detach_client(client); if (!err) kfree(data);