aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm93.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/lm93.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/lm93.c')
-rw-r--r--drivers/hwmon/lm93.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/lm93.c b/drivers/hwmon/lm93.c
index 86c6c6ea0745..b9899b93c25e 100644
--- a/drivers/hwmon/lm93.c
+++ b/drivers/hwmon/lm93.c
@@ -201,7 +201,7 @@ struct block1_t {
201 */ 201 */
202struct lm93_data { 202struct lm93_data {
203 struct i2c_client client; 203 struct i2c_client client;
204 struct class_device *class_dev; 204 struct device *hwmon_dev;
205 205
206 struct mutex update_lock; 206 struct mutex update_lock;
207 unsigned long last_updated; /* In jiffies */ 207 unsigned long last_updated; /* In jiffies */
@@ -2590,11 +2590,11 @@ static int lm93_detect(struct i2c_adapter *adapter, int address, int kind)
2590 goto err_detach; 2590 goto err_detach;
2591 2591
2592 /* Register hwmon driver class */ 2592 /* Register hwmon driver class */
2593 data->class_dev = hwmon_device_register(&client->dev); 2593 data->hwmon_dev = hwmon_device_register(&client->dev);
2594 if ( !IS_ERR(data->class_dev)) 2594 if ( !IS_ERR(data->hwmon_dev))
2595 return 0; 2595 return 0;
2596 2596
2597 err = PTR_ERR(data->class_dev); 2597 err = PTR_ERR(data->hwmon_dev);
2598 dev_err(&client->dev, "error registering hwmon device.\n"); 2598 dev_err(&client->dev, "error registering hwmon device.\n");
2599 sysfs_remove_group(&client->dev.kobj, &lm93_attr_grp); 2599 sysfs_remove_group(&client->dev.kobj, &lm93_attr_grp);
2600err_detach: 2600err_detach:
@@ -2619,7 +2619,7 @@ static int lm93_detach_client(struct i2c_client *client)
2619 struct lm93_data *data = i2c_get_clientdata(client); 2619 struct lm93_data *data = i2c_get_clientdata(client);
2620 int err = 0; 2620 int err = 0;
2621 2621
2622 hwmon_device_unregister(data->class_dev); 2622 hwmon_device_unregister(data->hwmon_dev);
2623 sysfs_remove_group(&client->dev.kobj, &lm93_attr_grp); 2623 sysfs_remove_group(&client->dev.kobj, &lm93_attr_grp);
2624 2624
2625 err = i2c_detach_client(client); 2625 err = i2c_detach_client(client);