summaryrefslogtreecommitdiff
path: root/drivers/hwmon/fam15h_power.c
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2012-04-25 13:44:20 -0700
committerBen Hutchings <ben@decadent.org.uk>2012-05-11 13:14:36 +0100
commita3d96e2fff39b1b16f4440cfa6796d12e9d20dcf (patch)
tree478a692190ffea6cc9bfb8cf233f35c440d9e892 /drivers/hwmon/fam15h_power.c
parent8198e9bfd86f983380946965d825972fe432cc0c (diff)
hwmon: (fam15h_power) Fix pci_device_id array
commit c3e40a9972428d6e2d8e287ed0233a57a218c30f upstream. pci_match_id() takes an *array* of IDs which must be properly zero- terminated. Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
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 99aaf2ec5e90..9a4c3abc9d92 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)
* counter saturations resulting in bogus power readings.
* We correct this value ourselves to cope with older BIOSes.
*/
+static DEFINE_PCI_DEVICE_TABLE(affected_device) = {
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
+ { 0 }
+};
+
static void __devinit tweak_runavg_range(struct pci_dev *pdev)
{
u32 val;
- const struct pci_device_id affected_device = {
- PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) };
/*
* let this quirk apply only to the current version of the
* northbridge, since future versions may change the behavior
*/
- if (!pci_match_id(&affected_device, pdev))
+ if (!pci_match_id(affected_device, pdev))
return;
pci_bus_read_config_dword(pdev->bus,