Commit a3d96e2f authored by Guenter Roeck's avatar Guenter Roeck Committed by Ben Hutchings

hwmon: (fam15h_power) Fix pci_device_id array

commit c3e40a99 upstream.

pci_match_id() takes an *array* of IDs which must be properly zero-
terminated.
Reported-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 8198e9bf
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment