aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/k10temp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/k10temp.c')
-rw-r--r--drivers/hwmon/k10temp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index 82bf65aa2968..41aa6a319870 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * k10temp.c - AMD Family 10h/11h/12h/14h processor hardware monitoring 2 * k10temp.c - AMD Family 10h/11h/12h/14h/15h processor hardware monitoring
3 * 3 *
4 * Copyright (c) 2009 Clemens Ladisch <clemens@ladisch.de> 4 * Copyright (c) 2009 Clemens Ladisch <clemens@ladisch.de>
5 * 5 *
@@ -25,7 +25,7 @@
25#include <linux/pci.h> 25#include <linux/pci.h>
26#include <asm/processor.h> 26#include <asm/processor.h>
27 27
28MODULE_DESCRIPTION("AMD Family 10h/11h/12h/14h CPU core temperature monitor"); 28MODULE_DESCRIPTION("AMD Family 10h+ CPU core temperature monitor");
29MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>"); 29MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
30MODULE_LICENSE("GPL"); 30MODULE_LICENSE("GPL");
31 31
@@ -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,13 +202,14 @@ 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[] = {
209 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) }, 209 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) },
210 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_11H_NB_MISC) }, 210 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_11H_NB_MISC) },
211 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, 211 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) },
212 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F3) },
212 {} 213 {}
213}; 214};
214MODULE_DEVICE_TABLE(pci, k10temp_id_table); 215MODULE_DEVICE_TABLE(pci, k10temp_id_table);