diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-12-01 11:08:44 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2011-01-11 17:01:02 +0100 |
commit | 0d86d2bebb625a222f70b76972139f6a272e3e0b (patch) | |
tree | 2f8763d0041b82f41ef9b14ab6e5529a3c4b6e71 /hw/usb-musb.c | |
parent | ed5a83ddd8c1d8ec7b1015315530cf29949e7c48 (diff) | |
download | qemu-0d86d2bebb625a222f70b76972139f6a272e3e0b.zip qemu-0d86d2bebb625a222f70b76972139f6a272e3e0b.tar.gz qemu-0d86d2bebb625a222f70b76972139f6a272e3e0b.tar.bz2 |
usb: create USBPortOps, move attach there.
Create USBPortOps struct, move the attach function to that struct.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb-musb.c')
-rw-r--r-- | hw/usb-musb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/usb-musb.c b/hw/usb-musb.c index 9efe7a6..592d3e6 100644 --- a/hw/usb-musb.c +++ b/hw/usb-musb.c @@ -261,6 +261,10 @@ static void musb_attach(USBPort *port, USBDevice *dev); +static USBPortOps musb_port_ops = { + .attach = musb_attach, +}; + typedef struct { uint16_t faddr[2]; uint8_t haddr[2]; @@ -343,7 +347,7 @@ struct MUSBState { } usb_bus_new(&s->bus, NULL /* FIXME */); - usb_register_port(&s->bus, &s->port, s, 0, NULL, musb_attach); + usb_register_port(&s->bus, &s->port, s, 0, NULL, &musb_port_ops); return s; } |