summaryrefslogtreecommitdiff
path: root/drivers/hwmon/k10temp.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2011-05-25 22:43:31 +0400
committerJean Delvare <khali@endymion.delvare>2011-05-25 22:43:31 +0400
commit95de3b257516d21af6e0313c7bab119e4f80d6f4 (patch)
tree818026064f6a1602e08521f5adaed3aed6313013 /drivers/hwmon/k10temp.c
parentbc1f419c76a2d6450413ce4349f4e4a07be011d5 (diff)
downloadlinux-95de3b257516d21af6e0313c7bab119e4f80d6f4.tar.xz
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,
err = PTR_ERR(hwmon_dev);
goto exit_remove;
}
- dev_set_drvdata(&pdev->dev, hwmon_dev);
+ pci_set_drvdata(pdev, hwmon_dev);
if (unreliable && force)
dev_warn(&pdev->dev,
@@ -194,7 +194,7 @@ exit:
static void __devexit k10temp_remove(struct pci_dev *pdev)
{
- hwmon_device_unregister(dev_get_drvdata(&pdev->dev));
+ hwmon_device_unregister(pci_get_drvdata(pdev));
device_remove_file(&pdev->dev, &dev_attr_name);
device_remove_file(&pdev->dev, &dev_attr_temp1_input);
device_remove_file(&pdev->dev, &dev_attr_temp1_max);
@@ -202,7 +202,7 @@ static void __devexit k10temp_remove(struct pci_dev *pdev)
&sensor_dev_attr_temp1_crit.dev_attr);
device_remove_file(&pdev->dev,
&sensor_dev_attr_temp1_crit_hyst.dev_attr);
- dev_set_drvdata(&pdev->dev, NULL);
+ pci_set_drvdata(pdev, NULL);
}
static const struct pci_device_id k10temp_id_table[] = {