this patch changes vm86.c:do_bios to run_bios(dev, addr).

While doing this, we can remove lot of code duplication about searching
the device, which is already done in the parent pci_device.c.

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@487 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Stefan Reinauer 2007-09-05 01:41:52 +00:00
commit dde116bd69
2 changed files with 3 additions and 49 deletions

View file

@ -649,9 +649,9 @@ void pci_dev_set_subsystem(struct device *dev, unsigned int vendor,
void pci_dev_init(struct device *dev)
{
printk(BIOS_SPEW, "PCI: pci_dev_init\n");
#if defined(CONFIG_PCI_OPTION_ROM_RUN) && CONFIG_PCI_OPTION_ROM_RUN == 1
void run_bios(struct device *dev, unsigned long addr);
void do_vgabios(void);
struct rom_header *rom, *ram;
printk(BIOS_INFO, "Probing for option ROM\n");
@ -661,15 +661,8 @@ void pci_dev_init(struct device *dev)
ram = pci_rom_load(dev, rom);
if (ram == NULL)
return;
#if defined(CONFIG_PCI_OPTION_ROM_RUN_X86EMU) && \
CONFIG_PCI_OPTION_ROM_RUN_X86EMU == 1
run_bios(dev, ram);
#endif
#if defined(CONFIG_PCI_OPTION_ROM_RUN_VM86) && \
CONFIG_PCI_OPTION_ROM_RUN_VM86 == 1
do_vgabios();
#endif
#endif
}
/** Default device operation for PCI devices. */