Patchwork [RFC,v2,05/12] hw/pci.c: Make pci_add_option_rom global visible

login
register
mail settings
Submitter Evgeny Voevodin
Date Sept. 17, 2012, 10 a.m.
Message ID <1347876042-22609-6-git-send-email-e.voevodin@samsung.com>
Download mbox | patch
Permalink /patch/184374/
State New
Headers show

Comments

Evgeny Voevodin - Sept. 17, 2012, 10 a.m.
We need to use this function to load rom for virtio-net backend.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
---
 hw/pci.c |    3 +--
 hw/pci.h |    2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/pci.c b/hw/pci.c
index f855cf3..bba69ef 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -77,7 +77,6 @@  static const TypeInfo pci_bus_info = {
 static PCIBus *pci_find_bus_nr(PCIBus *bus, int bus_num);
 static void pci_update_mappings(PCIDevice *d);
 static void pci_set_irq(void *opaque, int irq_num, int level);
-static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom);
 static void pci_del_option_rom(PCIDevice *pdev);
 
 static uint16_t pci_default_sub_vendor_id = PCI_SUBVENDOR_ID_REDHAT_QUMRANET;
@@ -1733,7 +1732,7 @@  static void pci_patch_ids(PCIDevice *pdev, uint8_t *ptr, int size)
 }
 
 /* Add an option rom for the device */
-static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom)
+int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom)
 {
     int size;
     char *path;
diff --git a/hw/pci.h b/hw/pci.h
index 4b6ab3d..5f47618 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -274,6 +274,8 @@  void pci_register_bar(PCIDevice *pci_dev, int region_num,
                       uint8_t attr, MemoryRegion *memory);
 pcibus_t pci_get_bar_addr(PCIDevice *pci_dev, int region_num);
 
+int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom);
+
 int pci_add_capability(PCIDevice *pdev, uint8_t cap_id,
                        uint8_t offset, uint8_t size);