static int usb_qdev_init(DeviceState *qdev, DeviceInfo *base)

{

    USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev);

    USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, qdev, base);

    int rc;



    pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc);

    dev->info = info;

    dev->auto_attach = 1;

    QLIST_INIT(&dev->strings);

    rc = dev->info->init(dev);

    if (rc == 0 && dev->auto_attach)

        rc = usb_device_attach(dev);

    return rc;

}

static int usb_qdev_init(DeviceState *qdev, DeviceInfo *base)

{

    USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev);

    USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, qdev, base);

    int rc;



    pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc);

    dev->info = info;

    dev->auto_attach = 1;

    QLIST_INIT(&dev->strings);

    rc = dev->info->init(dev);

    if (rc == 0 && dev->auto_attach)

        rc = usb_device_attach(dev);

    return rc;

}

static int FUNC_0(DeviceState *VAR_0, DeviceInfo *VAR_1)

{

    USBDevice *dev = DO_UPCAST(USBDevice, VAR_0, VAR_0);

    USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, VAR_0, VAR_1);

    int VAR_2;



    pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc);

    dev->info = info;

    dev->auto_attach = 1;

    QLIST_INIT(&dev->strings);

    VAR_2 = dev->info->init(dev);

    if (VAR_2 == 0 && dev->auto_attach)

        VAR_2 = usb_device_attach(dev);

    return VAR_2;

}

static int FUNC_0(DeviceState *VAR_0, DeviceInfo *VAR_1)
{ USBDevice *dev = DO_UPCAST(USBDevice, VAR_0, VAR_0); USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, VAR_0, VAR_1); int VAR_2; pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc); dev->info = info; dev->auto_attach = 1; QLIST_INIT(&dev->strings); VAR_2 = dev->info->init(dev); if (VAR_2 == 0 && dev->auto_attach)
VAR_2 = usb_device_attach(dev); return VAR_2; }