aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm90.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/lm90.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/lm90.c')
-rw-r--r--drivers/hwmon/lm90.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index af541d67245d..98b53b119c2a 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -214,7 +214,7 @@ static struct i2c_driver lm90_driver = {
214 214
215struct lm90_data { 215struct lm90_data {
216 struct i2c_client client; 216 struct i2c_client client;
217 struct class_device *class_dev; 217 struct device *hwmon_dev;
218 struct mutex update_lock; 218 struct mutex update_lock;
219 char valid; /* zero until following fields are valid */ 219 char valid; /* zero until following fields are valid */
220 unsigned long last_updated; /* in jiffies */ 220 unsigned long last_updated; /* in jiffies */
@@ -653,9 +653,9 @@ static int lm90_detect(struct i2c_adapter *adapter, int address, int kind)
653 goto exit_remove_files; 653 goto exit_remove_files;
654 } 654 }
655 655
656 data->class_dev = hwmon_device_register(&new_client->dev); 656 data->hwmon_dev = hwmon_device_register(&new_client->dev);
657 if (IS_ERR(data->class_dev)) { 657 if (IS_ERR(data->hwmon_dev)) {
658 err = PTR_ERR(data->class_dev); 658 err = PTR_ERR(data->hwmon_dev);
659 goto exit_remove_files; 659 goto exit_remove_files;
660 } 660 }
661 661
@@ -707,7 +707,7 @@ static int lm90_detach_client(struct i2c_client *client)
707 struct lm90_data *data = i2c_get_clientdata(client); 707 struct lm90_data *data = i2c_get_clientdata(client);
708 int err; 708 int err;
709 709
710 hwmon_device_unregister(data->class_dev); 710 hwmon_device_unregister(data->hwmon_dev);
711 sysfs_remove_group(&client->dev.kobj, &lm90_group); 711 sysfs_remove_group(&client->dev.kobj, &lm90_group);
712 device_remove_file(&client->dev, &dev_attr_pec); 712 device_remove_file(&client->dev, &dev_attr_pec);
713 713