aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/fam15h_power.c
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2012-04-25 16:44:20 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-04-26 11:40:08 -0400
commitc3e40a9972428d6e2d8e287ed0233a57a218c30f (patch)
treec8b88e1ea6d9ad5f17e67a5fd2826b3d82527a7b /drivers/hwmon/fam15h_power.c
parenteae1415dda93fd4edcce0637aa64b3c9b567563f (diff)
hwmon: (fam15h_power) Fix pci_device_id array
pci_match_id() takes an *array* of IDs which must be properly zero- terminated. Reported-by: Ben Hutchings <ben@decadent.org.uk> Cc: stable@vger.kernel.org # 3.0+: 00250ec hwmon: fam15h_power: fix bogus values Cc: stable@vger.kernel.org # 3.0+ Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/fam15h_power.c')
-rw-r--r--drivers/hwmon/fam15h_power.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
index 37a8fc92b44a..e8e18cab1fb8 100644
--- a/drivers/hwmon/fam15h_power.c
+++ b/drivers/hwmon/fam15h_power.c
@@ -128,17 +128,20 @@ static bool __devinit fam15h_power_is_internal_node0(struct pci_dev *f4)
128 * counter saturations resulting in bogus power readings. 128 * counter saturations resulting in bogus power readings.
129 * We correct this value ourselves to cope with older BIOSes. 129 * We correct this value ourselves to cope with older BIOSes.
130 */ 130 */
131static DEFINE_PCI_DEVICE_TABLE(affected_device) = {
132 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
133 { 0 }
134};
135
131static void __devinit tweak_runavg_range(struct pci_dev *pdev) 136static void __devinit tweak_runavg_range(struct pci_dev *pdev)
132{ 137{
133 u32 val; 138 u32 val;
134 const struct pci_device_id affected_device = {
135 PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) };
136 139
137 /* 140 /*
138 * let this quirk apply only to the current version of the 141 * let this quirk apply only to the current version of the
139 * northbridge, since future versions may change the behavior 142 * northbridge, since future versions may change the behavior
140 */ 143 */
141 if (!pci_match_id(&affected_device, pdev)) 144 if (!pci_match_id(affected_device, pdev))
142 return; 145 return;
143 146
144 pci_bus_read_config_dword(pdev->bus, 147 pci_bus_read_config_dword(pdev->bus,