diff options
author | Tony Jones <tonyj@suse.de> | 2007-08-20 13:46:20 -0700 |
---|---|---|
committer | Mark M. Hoffman <mhoffman@lightlink.com> | 2007-10-09 22:56:30 -0400 |
commit | 1beeffe43311f64df8dd0ab08ff6b1858c58363f (patch) | |
tree | 039324186049a69f3c791165e90404aef497f3cc /drivers/hwmon/lm70.c | |
parent | 59a35bafb223bbb0553ba1a3bb9280bda668a8d8 (diff) | |
download | linux-1beeffe43311f64df8dd0ab08ff6b1858c58363f.tar.bz2 |
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/lm70.c')
-rw-r--r-- | drivers/hwmon/lm70.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c index 30b9b2be87b9..dd366889ce9b 100644 --- a/drivers/hwmon/lm70.c +++ b/drivers/hwmon/lm70.c @@ -37,7 +37,7 @@ #define DRVNAME "lm70" struct lm70 { - struct class_device *cdev; + struct device *hwmon_dev; struct semaphore sem; }; @@ -115,10 +115,10 @@ static int __devinit lm70_probe(struct spi_device *spi) init_MUTEX(&p_lm70->sem); /* sysfs hook */ - p_lm70->cdev = hwmon_device_register(&spi->dev); - if (IS_ERR(p_lm70->cdev)) { + p_lm70->hwmon_dev = hwmon_device_register(&spi->dev); + if (IS_ERR(p_lm70->hwmon_dev)) { dev_dbg(&spi->dev, "hwmon_device_register failed.\n"); - status = PTR_ERR(p_lm70->cdev); + status = PTR_ERR(p_lm70->hwmon_dev); goto out_dev_reg_failed; } dev_set_drvdata(&spi->dev, p_lm70); @@ -133,7 +133,7 @@ static int __devinit lm70_probe(struct spi_device *spi) out_dev_create_file_failed: device_remove_file(&spi->dev, &dev_attr_temp1_input); - hwmon_device_unregister(p_lm70->cdev); + hwmon_device_unregister(p_lm70->hwmon_dev); out_dev_reg_failed: dev_set_drvdata(&spi->dev, NULL); kfree(p_lm70); @@ -146,7 +146,7 @@ static int __devexit lm70_remove(struct spi_device *spi) device_remove_file(&spi->dev, &dev_attr_temp1_input); device_remove_file(&spi->dev, &dev_attr_name); - hwmon_device_unregister(p_lm70->cdev); + hwmon_device_unregister(p_lm70->hwmon_dev); dev_set_drvdata(&spi->dev, NULL); kfree(p_lm70); |