aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm87.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/lm87.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/lm87.c')
-rw-r--r--drivers/hwmon/lm87.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/lm87.c b/drivers/hwmon/lm87.c
index 988ae1c4aada..e60076e8b597 100644
--- a/drivers/hwmon/lm87.c
+++ b/drivers/hwmon/lm87.c
@@ -176,7 +176,7 @@ static struct i2c_driver lm87_driver = {
176 176
177struct lm87_data { 177struct lm87_data {
178 struct i2c_client client; 178 struct i2c_client client;
179 struct class_device *class_dev; 179 struct device *hwmon_dev;
180 struct mutex update_lock; 180 struct mutex update_lock;
181 char valid; /* zero until following fields are valid */ 181 char valid; /* zero until following fields are valid */
182 unsigned long last_updated; /* In jiffies */ 182 unsigned long last_updated; /* In jiffies */
@@ -755,9 +755,9 @@ static int lm87_detect(struct i2c_adapter *adapter, int address, int kind)
755 goto exit_remove; 755 goto exit_remove;
756 } 756 }
757 757
758 data->class_dev = hwmon_device_register(&new_client->dev); 758 data->hwmon_dev = hwmon_device_register(&new_client->dev);
759 if (IS_ERR(data->class_dev)) { 759 if (IS_ERR(data->hwmon_dev)) {
760 err = PTR_ERR(data->class_dev); 760 err = PTR_ERR(data->hwmon_dev);
761 goto exit_remove; 761 goto exit_remove;
762 } 762 }
763 763
@@ -816,7 +816,7 @@ static int lm87_detach_client(struct i2c_client *client)
816 struct lm87_data *data = i2c_get_clientdata(client); 816 struct lm87_data *data = i2c_get_clientdata(client);
817 int err; 817 int err;
818 818
819 hwmon_device_unregister(data->class_dev); 819 hwmon_device_unregister(data->hwmon_dev);
820 sysfs_remove_group(&client->dev.kobj, &lm87_group); 820 sysfs_remove_group(&client->dev.kobj, &lm87_group);
821 sysfs_remove_group(&client->dev.kobj, &lm87_group_opt); 821 sysfs_remove_group(&client->dev.kobj, &lm87_group_opt);
822 822