diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-05-06 00:35:31 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-05-06 00:35:31 +0000 |
commit | 29a101d719e4b171e3b5bd26516ff149c05c722d (patch) | |
tree | d09785719fbf7bc484a2d5effb3748436c07ff71 /chipset_enable.c | |
parent | ac4846ad9d545389c83621d7e490ea06691661e8 (diff) | |
download | flashrom-29a101d719e4b171e3b5bd26516ff149c05c722d.zip flashrom-29a101d719e4b171e3b5bd26516ff149c05c722d.tar.gz |
Clean up the SB400 chipset enable code
Use pci_dev_find() instead of setting up a filter and iterating over
PCI devices.
Corresponding to flashrom svn r464.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Diffstat (limited to 'chipset_enable.c')
-rw-r--r-- | chipset_enable.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/chipset_enable.c b/chipset_enable.c index 14db352..99ed3d5 100644 --- a/chipset_enable.c +++ b/chipset_enable.c @@ -741,18 +741,10 @@ static int enable_flash_ck804(struct pci_dev *dev, const char *name) static int enable_flash_sb400(struct pci_dev *dev, const char *name) { uint8_t tmp; - struct pci_filter f; struct pci_dev *smbusdev; /* Look for the SMBus device. */ - pci_filter_init((struct pci_access *)0, &f); - f.vendor = 0x1002; - f.device = 0x4372; - - for (smbusdev = pacc->devices; smbusdev; smbusdev = smbusdev->next) { - if (pci_filter_match(&f, smbusdev)) - break; - } + smbusdev = pci_dev_find(0x1002, 0x4372); if (!smbusdev) { fprintf(stderr, "ERROR: SMBus device not found. Aborting.\n"); |