device/pci_rom: Make ON_DEVICE_ROM_LOAD condition truthy
Truthy conditions are easier to reason about. BUG=none TEST=Boot guybrush Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I229c3e90f5122d6191b28f9b4b6de79ac2fcb627 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56401 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
This commit is contained in:
parent
69cb69f35f
commit
ad5307e46c
|
@ -68,11 +68,7 @@ struct rom_header *pci_rom_probe(const struct device *dev)
|
|||
if (rom_header) {
|
||||
printk(BIOS_DEBUG, "In CBFS, ROM address for %s = %p\n",
|
||||
dev_path(dev), rom_header);
|
||||
} else if (!CONFIG(ON_DEVICE_ROM_LOAD)) {
|
||||
printk(BIOS_DEBUG, "PCI Option ROM loading disabled for %s\n",
|
||||
dev_path(dev));
|
||||
return NULL;
|
||||
} else {
|
||||
} else if (CONFIG(ON_DEVICE_ROM_LOAD)) {
|
||||
uintptr_t rom_address;
|
||||
|
||||
rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS);
|
||||
|
@ -93,6 +89,10 @@ struct rom_header *pci_rom_probe(const struct device *dev)
|
|||
printk(BIOS_DEBUG, "Option ROM address for %s = %lx\n",
|
||||
dev_path(dev), (unsigned long)rom_address);
|
||||
rom_header = (struct rom_header *)rom_address;
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "PCI Option ROM loading disabled for %s\n",
|
||||
dev_path(dev));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
printk(BIOS_SPEW,
|
||||
|
|
Loading…
Reference in New Issue