static int usb_wacom_handle_data(USBDevice *dev, USBPacket *p)

{

    USBWacomState *s = (USBWacomState *) dev;

    int ret = 0;



    switch (p->pid) {

    case USB_TOKEN_IN:

        if (p->devep == 1) {

            if (!(s->changed || s->idle))

                return USB_RET_NAK;

            s->changed = 0;

            if (s->mode == WACOM_MODE_HID)

                ret = usb_mouse_poll(s, p->data, p->len);

            else if (s->mode == WACOM_MODE_WACOM)

                ret = usb_wacom_poll(s, p->data, p->len);

            break;

        }

        /* Fall through.  */

    case USB_TOKEN_OUT:

    default:

        ret = USB_RET_STALL;

        break;

    }

    return ret;

}

static int usb_wacom_handle_data(USBDevice *dev, USBPacket *p)

{

    USBWacomState *s = (USBWacomState *) dev;

    int ret = 0;



    switch (p->pid) {

    case USB_TOKEN_IN:

        if (p->devep == 1) {

            if (!(s->changed || s->idle))

                return USB_RET_NAK;

            s->changed = 0;

            if (s->mode == WACOM_MODE_HID)

                ret = usb_mouse_poll(s, p->data, p->len);

            else if (s->mode == WACOM_MODE_WACOM)

                ret = usb_wacom_poll(s, p->data, p->len);

            break;

        }

        

    case USB_TOKEN_OUT:

    default:

        ret = USB_RET_STALL;

        break;

    }

    return ret;

}

                ret = usb_mouse_poll(s, p->data, p->len);                 ret = usb_wacom_poll(s, p->data, p->len);
static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)

{

    USBWacomState *s = (USBWacomState *) VAR_0;

    int VAR_2 = 0;



    switch (VAR_1->pid) {

    case USB_TOKEN_IN:

        if (VAR_1->devep == 1) {

            if (!(s->changed || s->idle))

                return USB_RET_NAK;

            s->changed = 0;

            if (s->mode == WACOM_MODE_HID)

                VAR_2 = usb_mouse_poll(s, VAR_1->data, VAR_1->len);

            else if (s->mode == WACOM_MODE_WACOM)

                VAR_2 = usb_wacom_poll(s, VAR_1->data, VAR_1->len);

            break;

        }

        

    case USB_TOKEN_OUT:

    default:

        VAR_2 = USB_RET_STALL;

        break;

    }

    return VAR_2;

}

static int FUNC_0(USBDevice *VAR_0, USBPacket *VAR_1)
{ USBWacomState *s = (USBWacomState *) VAR_0; int VAR_2 = 0; switch (VAR_1->pid) { case USB_TOKEN_IN:
if (VAR_1->devep == 1) { if (!(s->changed || s->idle))
return USB_RET_NAK; s->changed = 0; if (s->mode == WACOM_MODE_HID)
VAR_2 = usb_mouse_poll(s, VAR_1->data, VAR_1->len); else if (s->mode == WACOM_MODE_WACOM)
VAR_2 = usb_wacom_poll(s, VAR_1->data, VAR_1->len); break; } case USB_TOKEN_OUT:
default:
VAR_2 = USB_RET_STALL; break; } return VAR_2; }