aboutsummaryrefslogtreecommitdiff
path: root/hw/pci_host.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2009-10-30 21:21:16 +0900
committerAnthony Liguori <aliguori@us.ibm.com>2009-11-09 08:43:09 -0600
commitce195fb532ae6736318f4d05b0a72f055ae2ea60 (patch)
tree769921c52f8f97746838cea15d86f7acbdda5c6a /hw/pci_host.c
parent766347cc8cfca40a4e9585e6a7a83c2d603609c7 (diff)
pci_host: change the signature of pci_data_{read, write}.
change the first argument, void *opaque to PCIBus *s of the pci_data_{read, write}. They aren't used as direct callback so the argument type don't have to be void*. So change it to the right type. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci_host.c')
-rw-r--r--hw/pci_host.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/pci_host.c b/hw/pci_host.c
index 351ade4649..f4518dce72 100644
--- a/hw/pci_host.c
+++ b/hw/pci_host.c
@@ -52,9 +52,8 @@ static inline uint32_t pci_addr_to_config(uint32_t addr)
return addr & (PCI_CONFIG_SPACE_SIZE - 1);
}
-void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len)
+void pci_data_write(PCIBus *s, uint32_t addr, uint32_t val, int len)
{
- PCIBus *s = opaque;
PCIDevice *pci_dev = pci_addr_to_dev(s, addr);
uint32_t config_addr = pci_addr_to_config(addr);
@@ -66,9 +65,8 @@ void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len)
pci_dev->config_write(pci_dev, config_addr, val, len);
}
-uint32_t pci_data_read(void *opaque, uint32_t addr, int len)
+uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len)
{
- PCIBus *s = opaque;
PCIDevice *pci_dev = pci_addr_to_dev(s, addr);
uint32_t config_addr = pci_addr_to_config(addr);
uint32_t val;