usb: zap pdev from usbport
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 12 Jan 2011 10:34:50 +0000 (11:34 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 12 Jan 2011 10:40:04 +0000 (11:40 +0100)
It isn't needed any more.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb-bus.c
hw/usb-hub.c
hw/usb-musb.c
hw/usb-ohci.c
hw/usb-uhci.c
hw/usb.h

index f89176b912b211a194d7ef5e644f6f7e1c9a1c3d..6e2e5fd17a201477c1adc743aaf39443e83a7b2e 100644 (file)
@@ -120,11 +120,10 @@ USBDevice *usb_create_simple(USBBus *bus, const char *name)
 }
 
 void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index,
-                       USBDevice *pdev, USBPortOps *ops, int speedmask)
+                       USBPortOps *ops, int speedmask)
 {
     port->opaque = opaque;
     port->index = index;
-    port->pdev = pdev;
     port->opaque = opaque;
     port->index = index;
     port->ops = ops;
index 387c40c040e87587be261f4d0595adb4537d9600..78698caf67c4f414e5c345063abaef2a58165aa4 100644 (file)
@@ -536,7 +536,7 @@ static int usb_hub_initfn(USBDevice *dev)
     for (i = 0; i < NUM_PORTS; i++) {
         port = &s->ports[i];
         usb_register_port(usb_bus_from_device(dev),
-                          &port->port, s, i, &s->dev, &usb_hub_port_ops,
+                          &port->port, s, i, &usb_hub_port_ops,
                           USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
         port->wPortStatus = PORT_STAT_POWER;
         port->wPortChange = 0;
index 4b5f35b4b1b5461d2388c2b966681731278463a0..782cfa22821f65b2635018658584ac04a0c18972 100644 (file)
@@ -349,7 +349,7 @@ struct MUSBState {
     }
 
     usb_bus_new(&s->bus, NULL /* FIXME */);
-    usb_register_port(&s->bus, &s->port, s, 0, NULL, &musb_port_ops,
+    usb_register_port(&s->bus, &s->port, s, 0, &musb_port_ops,
                       USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
     usb_port_location(&s->port, NULL, 1);
 
index 6344f81806d09b363e02d19f03340aa521212d14..09ea0b6260f02a5b96ebc8337574c5886642572b 100644 (file)
@@ -1699,7 +1699,7 @@ static void usb_ohci_init(OHCIState *ohci, DeviceState *dev,
     usb_bus_new(&ohci->bus, dev);
     ohci->num_ports = num_ports;
     for (i = 0; i < num_ports; i++) {
-        usb_register_port(&ohci->bus, &ohci->rhport[i].port, ohci, i, NULL, &ohci_port_ops,
+        usb_register_port(&ohci->bus, &ohci->rhport[i].port, ohci, i, &ohci_port_ops,
                           USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
         usb_port_location(&ohci->rhport[i].port, NULL, i+1);
     }
index 6db19602e696b0fd1a61c1a6b6eb25874313ada5..b384e1ddec203dfc8b709c981054d7d0312f7719 100644 (file)
@@ -1129,7 +1129,7 @@ static int usb_uhci_common_initfn(UHCIState *s)
 
     usb_bus_new(&s->bus, &s->dev.qdev);
     for(i = 0; i < NB_PORTS; i++) {
-        usb_register_port(&s->bus, &s->ports[i].port, s, i, NULL, &uhci_port_ops,
+        usb_register_port(&s->bus, &s->ports[i].port, s, i, &uhci_port_ops,
                           USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL);
         usb_port_location(&s->ports[i].port, NULL, i+1);
     }
index c6e3e25286082264e2d3759c631e266898cce04f..5c1da3ed25291f8e7f805ea3b43a4931e4f82bca 100644 (file)
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -244,7 +244,6 @@ struct USBPort {
     char path[16];
     USBPortOps *ops;
     void *opaque;
-    USBDevice *pdev;
     int index; /* internal port index, may be used with the opaque */
     QTAILQ_ENTRY(USBPort) next;
 };
@@ -355,7 +354,7 @@ USBDevice *usb_create(USBBus *bus, const char *name);
 USBDevice *usb_create_simple(USBBus *bus, const char *name);
 USBDevice *usbdevice_create(const char *cmdline);
 void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index,
-                       USBDevice *pdev, USBPortOps *ops, int speedmask);
+                       USBPortOps *ops, int speedmask);
 void usb_port_location(USBPort *downstream, USBPort *upstream, int portnr);
 void usb_unregister_port(USBBus *bus, USBPort *port);
 int usb_device_attach(USBDevice *dev);