aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/k10temp.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2011-05-25 14:43:31 -0400
committerJean Delvare <khali@endymion.delvare>2011-05-25 14:43:31 -0400
commit95de3b257516d21af6e0313c7bab119e4f80d6f4 (patch)
tree818026064f6a1602e08521f5adaed3aed6313013 /drivers/hwmon/k10temp.c
parentbc1f419c76a2d6450413ce4349f4e4a07be011d5 (diff)
hwmon: Use helper functions to set and get driver data
Use helper functions to set and get driver data. This is more elegant. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Andreas Herrmann <andreas.herrmann3@amd.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/k10temp.c')
-rw-r--r--drivers/hwmon/k10temp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index 82bf65aa2968..91df4d516a6d 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -173,7 +173,7 @@ static int __devinit k10temp_probe(struct pci_dev *pdev,
173 err = PTR_ERR(hwmon_dev); 173 err = PTR_ERR(hwmon_dev);
174 goto exit_remove; 174 goto exit_remove;
175 } 175 }
176 dev_set_drvdata(&pdev->dev, hwmon_dev); 176 pci_set_drvdata(pdev, hwmon_dev);
177 177
178 if (unreliable && force) 178 if (unreliable && force)
179 dev_warn(&pdev->dev, 179 dev_warn(&pdev->dev,
@@ -194,7 +194,7 @@ exit:
194 194
195static void __devexit k10temp_remove(struct pci_dev *pdev) 195static void __devexit k10temp_remove(struct pci_dev *pdev)
196{ 196{
197 hwmon_device_unregister(dev_get_drvdata(&pdev->dev)); 197 hwmon_device_unregister(pci_get_drvdata(pdev));
198 device_remove_file(&pdev->dev, &dev_attr_name); 198 device_remove_file(&pdev->dev, &dev_attr_name);
199 device_remove_file(&pdev->dev, &dev_attr_temp1_input); 199 device_remove_file(&pdev->dev, &dev_attr_temp1_input);
200 device_remove_file(&pdev->dev, &dev_attr_temp1_max); 200 device_remove_file(&pdev->dev, &dev_attr_temp1_max);
@@ -202,7 +202,7 @@ static void __devexit k10temp_remove(struct pci_dev *pdev)
202 &sensor_dev_attr_temp1_crit.dev_attr); 202 &sensor_dev_attr_temp1_crit.dev_attr);
203 device_remove_file(&pdev->dev, 203 device_remove_file(&pdev->dev,
204 &sensor_dev_attr_temp1_crit_hyst.dev_attr); 204 &sensor_dev_attr_temp1_crit_hyst.dev_attr);
205 dev_set_drvdata(&pdev->dev, NULL); 205 pci_set_drvdata(pdev, NULL);
206} 206}
207 207
208static const struct pci_device_id k10temp_id_table[] = { 208static const struct pci_device_id k10temp_id_table[] = {