diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-07-17 22:28:05 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-07-17 22:28:05 +0000 |
commit | 44cd9ab0805d1d9e9a7d8f7af7ae4270b5d66753 (patch) | |
tree | 3cedbec24c7df715db04f7353af94342773e2769 | |
parent | b51e58e50f23aa5f88d2e4259e82a488060f35ee (diff) | |
download | flashrom-44cd9ab0805d1d9e9a7d8f7af7ae4270b5d66753.tar.gz flashrom-44cd9ab0805d1d9e9a7d8f7af7ae4270b5d66753.tar.bz2 flashrom-44cd9ab0805d1d9e9a7d8f7af7ae4270b5d66753.zip |
Add support for pciutils/libpci older than 2.2
Needed on the original Xbox running Xebian and a few other ancient
systems.
Corresponding to flashrom svn r1088.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Alec Wright <alecjw@member.fsf.org>
-rw-r--r-- | board_enable.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board_enable.c b/board_enable.c index 57745fc4f..bd99dade9 100644 --- a/board_enable.c +++ b/board_enable.c @@ -785,7 +785,15 @@ static int nvidia_mcp_gpio_set(int gpio, int raise) return -1; } +#if PCI_LIB_VERSION >= 0x020200 dev = pci_get_dev(pacc, dev->domain, dev->bus, dev->dev, 1); +#else + /* pciutils/libpci before version 2.2 is too old to support + * PCI domains. Such old machines usually don't have domains + * besides domain 0, so this is not a problem. + */ + dev = pci_get_dev(pacc, dev->bus, dev->dev, 1); +#endif if (!dev) { msg_perr("MCP SMBus controller could not be found\n"); return -1; |