AUTHORS, util/: Drop individual copyright notices
[coreboot.git] / util / superiotool / pci.c
blob1e0c9c1779ae9b0ea1163f57c9b5ce063afe1265
1 /* This file is part of the superiotool project */
2 /*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #include "superiotool.h"
16 struct pci_access *pacc;
18 struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device)
20 struct pci_dev *temp;
21 struct pci_filter filter;
23 pci_filter_init(NULL, &filter);
24 filter.vendor = vendor;
25 filter.device = device;
27 for (temp = pacc->devices; temp; temp = temp->next)
28 if (pci_filter_match(&filter, temp))
29 return temp;
31 return NULL;