Re: [linux-usb-devel] [PATCH] add support for PANJIT TouchSet USB Touchscreen Device

From: Oliver Neukum
Date: Mon Mar 06 2006 - 06:04:19 EST


Am Montag, 6. März 2006 10:14 schrieb Lanslott Gish:
> hi,
>
> this is the first version of the patch from a newbie :)
> add support for PANJIT TouchSet USB touchscreen device.
>

> +#define TOUCHSET_DOWN 0x01
> +#define TOUCHSET_POINT_TOUCH 0x81
> +#define TOUCHSET_POINT_NOTOUCH 0x80
> +
> +#define TOUCHSET_GET_TOUCHED(dat) ((((dat)[0]) & TOUCHSET_DOWN) ? 1 : 0)

Drop the "?"

> +static int touchset_open(struct input_dev *input)
> +{
> + struct touchset_usb *touchset = input->private;
> +
> + touchset->irq->dev = touchset->udev;
> +
> + if (usb_submit_urb(touchset->irq, GFP_ATOMIC))

GFP_KERNEL

> + return -EIO;
> +
> + return 0;
> +}
> +
> +static void touchset_close(struct input_dev *input)
> +{
> + struct touchset_usb *touchset = input->private;
> +
> + usb_kill_urb(touchset->irq);
> +}
> +
> +static int touchset_alloc_buffers(struct usb_device *udev,
> + struct touchset_usb *touchset)
> +{
> + touchset->data = usb_buffer_alloc(udev, TOUCHSET_REPORT_DATA_SIZE,
> + SLAB_ATOMIC, &touchset->data_dma);

SLAB_KERNEL

Regards
Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/