aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm70.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/lm70.c')
-rw-r--r--drivers/hwmon/lm70.c12
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 @@
37#define DRVNAME "lm70" 37#define DRVNAME "lm70"
38 38
39struct lm70 { 39struct lm70 {
40 struct class_device *cdev; 40 struct device *hwmon_dev;
41 struct semaphore sem; 41 struct semaphore sem;
42}; 42};
43 43
@@ -115,10 +115,10 @@ static int __devinit lm70_probe(struct spi_device *spi)
115 init_MUTEX(&p_lm70->sem); 115 init_MUTEX(&p_lm70->sem);
116 116
117 /* sysfs hook */ 117 /* sysfs hook */
118 p_lm70->cdev = hwmon_device_register(&spi->dev); 118 p_lm70->hwmon_dev = hwmon_device_register(&spi->dev);
119 if (IS_ERR(p_lm70->cdev)) { 119 if (IS_ERR(p_lm70->hwmon_dev)) {
120 dev_dbg(&spi->dev, "hwmon_device_register failed.\n"); 120 dev_dbg(&spi->dev, "hwmon_device_register failed.\n");
121 status = PTR_ERR(p_lm70->cdev); 121 status = PTR_ERR(p_lm70->hwmon_dev);
122 goto out_dev_reg_failed; 122 goto out_dev_reg_failed;
123 } 123 }
124 dev_set_drvdata(&spi->dev, p_lm70); 124 dev_set_drvdata(&spi->dev, p_lm70);
@@ -133,7 +133,7 @@ static int __devinit lm70_probe(struct spi_device *spi)
133 133
134out_dev_create_file_failed: 134out_dev_create_file_failed:
135 device_remove_file(&spi->dev, &dev_attr_temp1_input); 135 device_remove_file(&spi->dev, &dev_attr_temp1_input);
136 hwmon_device_unregister(p_lm70->cdev); 136 hwmon_device_unregister(p_lm70->hwmon_dev);
137out_dev_reg_failed: 137out_dev_reg_failed:
138 dev_set_drvdata(&spi->dev, NULL); 138 dev_set_drvdata(&spi->dev, NULL);
139 kfree(p_lm70); 139 kfree(p_lm70);
@@ -146,7 +146,7 @@ static int __devexit lm70_remove(struct spi_device *spi)
146 146
147 device_remove_file(&spi->dev, &dev_attr_temp1_input); 147 device_remove_file(&spi->dev, &dev_attr_temp1_input);
148 device_remove_file(&spi->dev, &dev_attr_name); 148 device_remove_file(&spi->dev, &dev_attr_name);
149 hwmon_device_unregister(p_lm70->cdev); 149 hwmon_device_unregister(p_lm70->hwmon_dev);
150 dev_set_drvdata(&spi->dev, NULL); 150 dev_set_drvdata(&spi->dev, NULL);
151 kfree(p_lm70); 151 kfree(p_lm70);
152 152