aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-ohci.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2011-05-25 10:58:29 +0900
committerMichael S. Tsirkin <mst@redhat.com>2011-06-12 10:33:37 +0300
commita8eae58556c7dc693d757a9144045fbee7434c6c (patch)
treecc01e4bb928de31c2d5697ee54757fee3550fc93 /hw/usb-ohci.c
parentd7b61ecc61f84d23f98f1ee270fb48b41834ca00 (diff)
hw/usb-ohci.c: convert to PCIDeviceInfo to initialize ids
use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/usb-ohci.c')
-rw-r--r--hw/usb-ohci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
index d21c820282..7ff23228cc 100644
--- a/hw/usb-ohci.c
+++ b/hw/usb-ohci.c
@@ -1716,11 +1716,7 @@ static int usb_ohci_initfn_pci(struct PCIDevice *dev)
OHCIPCIState *ohci = DO_UPCAST(OHCIPCIState, pci_dev, dev);
int num_ports = 3;
- pci_config_set_vendor_id(ohci->pci_dev.config, PCI_VENDOR_ID_APPLE);
- pci_config_set_device_id(ohci->pci_dev.config,
- PCI_DEVICE_ID_APPLE_IPID_USB);
ohci->pci_dev.config[PCI_CLASS_PROG] = 0x10; /* OHCI */
- pci_config_set_class(ohci->pci_dev.config, PCI_CLASS_SERIAL_USB);
/* TODO: RST# value should be 0. */
ohci->pci_dev.config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin 1 */
@@ -1760,6 +1756,9 @@ static PCIDeviceInfo ohci_pci_info = {
.qdev.desc = "Apple USB Controller",
.qdev.size = sizeof(OHCIPCIState),
.init = usb_ohci_initfn_pci,
+ .vendor_id = PCI_VENDOR_ID_APPLE,
+ .device_id = PCI_DEVICE_ID_APPLE_IPID_USB,
+ .class_id = PCI_CLASS_SERIAL_USB,
};
static SysBusDeviceInfo ohci_sysbus_info = {