aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pc87427.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/pc87427.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/pc87427.c')
-rw-r--r--drivers/hwmon/pc87427.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/pc87427.c b/drivers/hwmon/pc87427.c
index 2915bc4ad0d5..d40509ad6ae6 100644
--- a/drivers/hwmon/pc87427.c
+++ b/drivers/hwmon/pc87427.c
@@ -42,7 +42,7 @@ static struct platform_device *pdev;
42 device is using banked registers) and the register cache (needed to keep 42 device is using banked registers) and the register cache (needed to keep
43 the data in the registers and the cache in sync at any time). */ 43 the data in the registers and the cache in sync at any time). */
44struct pc87427_data { 44struct pc87427_data {
45 struct class_device *class_dev; 45 struct device *hwmon_dev;
46 struct mutex lock; 46 struct mutex lock;
47 int address[2]; 47 int address[2];
48 const char *name; 48 const char *name;
@@ -454,9 +454,9 @@ static int __devinit pc87427_probe(struct platform_device *pdev)
454 goto exit_remove_files; 454 goto exit_remove_files;
455 } 455 }
456 456
457 data->class_dev = hwmon_device_register(&pdev->dev); 457 data->hwmon_dev = hwmon_device_register(&pdev->dev);
458 if (IS_ERR(data->class_dev)) { 458 if (IS_ERR(data->hwmon_dev)) {
459 err = PTR_ERR(data->class_dev); 459 err = PTR_ERR(data->hwmon_dev);
460 dev_err(&pdev->dev, "Class registration failed (%d)\n", err); 460 dev_err(&pdev->dev, "Class registration failed (%d)\n", err);
461 goto exit_remove_files; 461 goto exit_remove_files;
462 } 462 }
@@ -484,7 +484,7 @@ static int __devexit pc87427_remove(struct platform_device *pdev)
484 struct resource *res; 484 struct resource *res;
485 int i; 485 int i;
486 486
487 hwmon_device_unregister(data->class_dev); 487 hwmon_device_unregister(data->hwmon_dev);
488 device_remove_file(&pdev->dev, &dev_attr_name); 488 device_remove_file(&pdev->dev, &dev_attr_name);
489 for (i = 0; i < 8; i++) { 489 for (i = 0; i < 8; i++) {
490 if (!(data->fan_enabled & (1 << i))) 490 if (!(data->fan_enabled & (1 << i)))