Author: uwe
Date: Wed Jul 13 13:22:03 2011
New Revision: 1371
URL: http://flashrom.org/trac/flashrom/changeset/1371

Log:
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.

Signed-off-by: Uwe Hermann <[email protected]>
Acked-by: Uwe Hermann <[email protected]>

Modified:
   trunk/internal.c
   trunk/programmer.h

Modified: trunk/internal.c
==============================================================================
--- trunk/internal.c    Wed Jul 13 00:35:21 2011        (r1370)
+++ trunk/internal.c    Wed Jul 13 13:22:03 2011        (r1371)
@@ -35,7 +35,7 @@
        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_filter filter;
@@ -48,7 +48,7 @@
                if (pci_filter_match(&filter, temp)) {
                        /* Read PCI class */
                        tmp2 = pci_read_word(temp, 0x0a);
-                       if (tmp2 == class)
+                       if (tmp2 == devclass)
                                return temp;
                }
 

Modified: trunk/programmer.h
==============================================================================
--- trunk/programmer.h  Wed Jul 13 00:35:21 2011        (r1370)
+++ trunk/programmer.h  Wed Jul 13 13:22:03 2011        (r1371)
@@ -289,7 +289,7 @@
 #endif
 #if NEED_PCI == 1
 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_card_find(uint16_t vendor, uint16_t device,
                              uint16_t card_vendor, uint16_t card_device);

_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to