aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm75.c
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2007-08-20 16:46:20 -0400
committerMark M. Hoffman <mhoffman@lightlink.com>2007-10-09 22:56:30 -0400
commit1beeffe43311f64df8dd0ab08ff6b1858c58363f (patch)
tree039324186049a69f3c791165e90404aef497f3cc /drivers/hwmon/lm75.c
parent59a35bafb223bbb0553ba1a3bb9280bda668a8d8 (diff)
hwmon: Convert from class_device to device
Convert from class_device to device for hwmon_device_register/unregister Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Diffstat (limited to 'drivers/hwmon/lm75.c')
-rw-r--r--drivers/hwmon/lm75.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index 4fa32205e44c..37a8cc032ffa 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -50,7 +50,7 @@ static const u8 LM75_REG_TEMP[3] = {
50/* Each client has this additional data */ 50/* Each client has this additional data */
51struct lm75_data { 51struct lm75_data {
52 struct i2c_client client; 52 struct i2c_client client;
53 struct class_device *class_dev; 53 struct device *hwmon_dev;
54 struct mutex update_lock; 54 struct mutex update_lock;
55 char valid; /* !=0 if following fields are valid */ 55 char valid; /* !=0 if following fields are valid */
56 unsigned long last_updated; /* In jiffies */ 56 unsigned long last_updated; /* In jiffies */
@@ -219,9 +219,9 @@ static int lm75_detect(struct i2c_adapter *adapter, int address, int kind)
219 if ((err = sysfs_create_group(&new_client->dev.kobj, &lm75_group))) 219 if ((err = sysfs_create_group(&new_client->dev.kobj, &lm75_group)))
220 goto exit_detach; 220 goto exit_detach;
221 221
222 data->class_dev = hwmon_device_register(&new_client->dev); 222 data->hwmon_dev = hwmon_device_register(&new_client->dev);
223 if (IS_ERR(data->class_dev)) { 223 if (IS_ERR(data->hwmon_dev)) {
224 err = PTR_ERR(data->class_dev); 224 err = PTR_ERR(data->hwmon_dev);
225 goto exit_remove; 225 goto exit_remove;
226 } 226 }
227 227
@@ -240,7 +240,7 @@ exit:
240static int lm75_detach_client(struct i2c_client *client) 240static int lm75_detach_client(struct i2c_client *client)
241{ 241{
242 struct lm75_data *data = i2c_get_clientdata(client); 242 struct lm75_data *data = i2c_get_clientdata(client);
243 hwmon_device_unregister(data->class_dev); 243 hwmon_device_unregister(data->hwmon_dev);
244 sysfs_remove_group(&client->dev.kobj, &lm75_group); 244 sysfs_remove_group(&client->dev.kobj, &lm75_group);
245 i2c_detach_client(client); 245 i2c_detach_client(client);
246 kfree(data); 246 kfree(data);