Revision 07771f6f hw/usb.h

b/hw/usb.h
132 132
#define USB_ENDPOINT_XFER_INT		3
133 133

  
134 134
typedef struct USBBus USBBus;
135
typedef struct USBBusOps USBBusOps;
135 136
typedef struct USBPort USBPort;
136 137
typedef struct USBDevice USBDevice;
137 138
typedef struct USBDeviceInfo USBDeviceInfo;
......
323 324

  
324 325
struct USBBus {
325 326
    BusState qbus;
327
    USBBusOps *ops;
326 328
    int busnr;
327 329
    int nfree;
328 330
    int nused;
......
331 333
    QTAILQ_ENTRY(USBBus) next;
332 334
};
333 335

  
334
void usb_bus_new(USBBus *bus, DeviceState *host);
336
struct USBBusOps {
337
    void (*device_destroy)(USBBus *bus, USBDevice *dev);
338
};
339

  
340
void usb_bus_new(USBBus *bus, USBBusOps *ops, DeviceState *host);
335 341
USBBus *usb_bus_find(int busnr);
336 342
void usb_qdev_register(USBDeviceInfo *info);
337 343
void usb_qdev_register_many(USBDeviceInfo *info);

Also available in: Unified diff