1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 23:22:37 +02:00

Change "class" parameter name to "devclass" to avoid C++ issues

In C++ "class" is a reserved keyword, and as we'll want to use libflashrom
from C++ code at some point, let's make sure it doesn't cause issues.
Other places in the code already used "devclass" anyway, so it also increases
consistency and readability a bit.

Corresponding to flashrom svn r1371.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
This commit is contained in:
Uwe Hermann 2011-07-13 11:22:03 +00:00
parent 269de3533a
commit 24c35e458d
2 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ struct pci_dev *pci_dev_find_filter(struct pci_filter filter)
return NULL; return NULL;
} }
struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t class) struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t devclass)
{ {
struct pci_dev *temp; struct pci_dev *temp;
struct pci_filter filter; struct pci_filter filter;
@ -48,7 +48,7 @@ struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t class)
if (pci_filter_match(&filter, temp)) { if (pci_filter_match(&filter, temp)) {
/* Read PCI class */ /* Read PCI class */
tmp2 = pci_read_word(temp, 0x0a); tmp2 = pci_read_word(temp, 0x0a);
if (tmp2 == class) if (tmp2 == devclass)
return temp; return temp;
} }

View File

@ -289,7 +289,7 @@ extern int superio_count;
#endif #endif
#if NEED_PCI == 1 #if NEED_PCI == 1
struct pci_dev *pci_dev_find_filter(struct pci_filter filter); struct pci_dev *pci_dev_find_filter(struct pci_filter filter);
struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t class); struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t devclass);
struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device); struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device);
struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device, struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device,
uint16_t card_vendor, uint16_t card_device); uint16_t card_vendor, uint16_t card_device);