From b87f23b163cba1012479250d48200ee4a42c93bb Mon Sep 17 00:00:00 2001 From: "Jonathan A. Kollasch" Date: Mon, 14 Dec 2009 04:24:42 +0000 Subject: Use pci_fill_info() so device_class is valid This is needed on NetBSD and probably other non-Linux platforms. Corresponding to flashrom svn r802. Signed-off-by: Jonathan A. Kollasch Acked-by: Carl-Daniel Hailfinger --- board_enable.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'board_enable.c') diff --git a/board_enable.c b/board_enable.c index 769b402..b64f906 100644 --- a/board_enable.c +++ b/board_enable.c @@ -605,7 +605,8 @@ static int intel_ich_gpio_set(int gpio, int raise) int i, allowed; /* First, look for a known LPC bridge */ - for (dev = pacc->devices; dev; dev = dev->next) + for (dev = pacc->devices; dev; dev = dev->next) { + pci_fill_info(dev, PCI_FILL_CLASS); if ((dev->vendor_id == 0x8086) && (dev->device_class == 0x0601)) { /* ISA Bridge */ /* Is this device in our list? */ @@ -616,6 +617,7 @@ static int intel_ich_gpio_set(int gpio, int raise) if (intel_ich_gpio_table[i].id) break; } + } if (!dev) { fprintf(stderr, "\nERROR: No Known Intel LPC Bridge found.\n"); -- cgit v1.1