diff options
-rw-r--r-- | src/device/pci_rom.c | 6 | ||||
-rw-r--r-- | src/include/device/pci_rom.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c index 1bdccf0474..dbc05ac790 100644 --- a/src/device/pci_rom.c +++ b/src/device/pci_rom.c @@ -29,6 +29,9 @@ #include <string.h> #include <cbfs.h> +/* Rmodules don't like weak symbols. */ +u32 __attribute__((weak)) map_oprom_vendev(u32 vendev) { return vendev; } + struct rom_header *pci_rom_probe(struct device *dev) { struct rom_header *rom_header; @@ -41,8 +44,7 @@ struct rom_header *pci_rom_probe(struct device *dev) u32 vendev = (dev->vendor << 16) | dev->device; u32 mapped_vendev = vendev; - if (map_oprom_vendev) - mapped_vendev = map_oprom_vendev(vendev); + mapped_vendev = map_oprom_vendev(vendev); if (!rom_header) { if (vendev != mapped_vendev) { diff --git a/src/include/device/pci_rom.h b/src/include/device/pci_rom.h index fe77276491..a929206318 100644 --- a/src/include/device/pci_rom.h +++ b/src/include/device/pci_rom.h @@ -35,6 +35,6 @@ struct pci_data { struct rom_header *pci_rom_probe(struct device *dev); struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_header); -u32 __attribute__((weak)) map_oprom_vendev(u32 vendev); +u32 map_oprom_vendev(u32 vendev); #endif |