On Wednesday 02 January 2008, I wrote:
> Your patch admittedly improves readability, but breaks the logic above.
I'd like to apply the beautifying part. What do you think?
[ "trivial" by Russ' definition, BTW ;-]
Torsten
--- src/devices/pci_device.c.orig 2007-10-03 00:13:15.000000000 +0200
+++ src/devices/pci_device.c 2008-01-02 23:55:02.000000000 +0100
@@ -643,11 +643,9 @@ void pci_dev_set_subsystem(device_t dev,
((device & 0xffff) << 16) | (vendor & 0xffff));
}
+/** default handler: only runs the relevant pci bios. */
void pci_dev_init(struct device *dev)
{
-#if CONFIG_CONSOLE_VGA == 1
- extern int vga_inited;
-#endif
#if CONFIG_PCI_ROM_RUN == 1 || CONFIG_CONSOLE_VGA == 1
struct rom_header *rom, *ram;
@@ -671,14 +669,13 @@ void pci_dev_init(struct device *dev)
run_bios(dev, ram);
#if CONFIG_CONSOLE_VGA == 1
- /* vga_inited is a trigger of the VGA console code.
- *
- * Only set it if we enabled VGA console, and if we
- * just initialized a VGA card.
- */
- vga_inited|=dev->class==PCI_CLASS_DISPLAY_VGA;
-#endif
-#endif
+ /* vga_inited is a trigger of the VGA console code. */
+ if (dev->class == PCI_CLASS_DISPLAY_VGA) {
+ extern int vga_inited;
+ vga_inited = TRUE;
+ }
+#endif /* CONFIG_CONSOLE_VGA */
+#endif /* CONFIG_PCI_ROM_RUN || CONFIG_CONSOLE_VGA */
}
/** Default device operation for PCI devices */
--
linuxbios mailing list
[email protected]
http://www.linuxbios.org/mailman/listinfo/linuxbios