Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183115
b: refs/heads/master
c: fea4d14
h: refs/heads/master
i:
  183113: 6642e90
  183111: fc81a33
v: v3
  • Loading branch information
Ondrej Zary authored and Dmitry Torokhov committed Feb 4, 2010
1 parent 44ca986 commit bddf395
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76cdc083f4d1a2a12a961634672fb9ca7adca29c
refs/heads/master: fea4d14b69567e134e1838155a5dc857ebca70cb
22 changes: 12 additions & 10 deletions trunk/drivers/input/touchscreen/usbtouchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct usbtouch_usb {
unsigned char *buffer;
int buf_len;
struct urb *irq;
struct usb_device *udev;
struct usb_interface *interface;
struct input_dev *input;
struct usbtouch_device_info *type;
char name[128];
Expand Down Expand Up @@ -234,8 +234,9 @@ static const struct usb_device_id usbtouch_devices[] = {
static int e2i_init(struct usbtouch_usb *usbtouch)
{
int ret;
struct usb_device *udev = interface_to_usbdev(usbtouch->interface);

ret = usb_control_msg(usbtouch->udev, usb_rcvctrlpipe(usbtouch->udev, 0),
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
0x01, 0x02, 0x0000, 0x0081,
NULL, 0, USB_CTRL_SET_TIMEOUT);

Expand Down Expand Up @@ -344,8 +345,9 @@ static int mtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
static int mtouch_init(struct usbtouch_usb *usbtouch)
{
int ret, i;
struct usb_device *udev = interface_to_usbdev(usbtouch->interface);

ret = usb_control_msg(usbtouch->udev, usb_rcvctrlpipe(usbtouch->udev, 0),
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
MTOUCHUSB_RESET,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
1, 0, NULL, 0, USB_CTRL_SET_TIMEOUT);
Expand All @@ -356,7 +358,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch)
msleep(150);

for (i = 0; i < 3; i++) {
ret = usb_control_msg(usbtouch->udev, usb_rcvctrlpipe(usbtouch->udev, 0),
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
MTOUCHUSB_ASYNC_REPORT,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
1, 1, NULL, 0, USB_CTRL_SET_TIMEOUT);
Expand Down Expand Up @@ -489,7 +491,7 @@ static int gunze_read_data(struct usbtouch_usb *dev, unsigned char *pkt)

static int dmc_tsc10_init(struct usbtouch_usb *usbtouch)
{
struct usb_device *dev = usbtouch->udev;
struct usb_device *dev = interface_to_usbdev(usbtouch->interface);
int ret = -ENOMEM;
unsigned char *buf;

Expand Down Expand Up @@ -1021,7 +1023,7 @@ static int usbtouch_open(struct input_dev *input)
{
struct usbtouch_usb *usbtouch = input_get_drvdata(input);

usbtouch->irq->dev = usbtouch->udev;
usbtouch->irq->dev = interface_to_usbdev(usbtouch->interface);

if (!usbtouch->type->irq_always) {
if (usb_submit_urb(usbtouch->irq, GFP_KERNEL))
Expand Down Expand Up @@ -1094,7 +1096,7 @@ static int usbtouch_probe(struct usb_interface *intf,
goto out_free_buffers;
}

usbtouch->udev = udev;
usbtouch->interface = intf;
usbtouch->input = input_dev;

if (udev->manufacturer)
Expand Down Expand Up @@ -1133,12 +1135,12 @@ static int usbtouch_probe(struct usb_interface *intf,
input_set_abs_params(input_dev, ABS_PRESSURE, type->min_press,
type->max_press, 0, 0);

usb_fill_int_urb(usbtouch->irq, usbtouch->udev,
usb_rcvintpipe(usbtouch->udev, endpoint->bEndpointAddress),
usb_fill_int_urb(usbtouch->irq, udev,
usb_rcvintpipe(udev, endpoint->bEndpointAddress),
usbtouch->data, type->rept_size,
usbtouch_irq, usbtouch, endpoint->bInterval);

usbtouch->irq->dev = usbtouch->udev;
usbtouch->irq->dev = udev;
usbtouch->irq->transfer_dma = usbtouch->data_dma;
usbtouch->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;

Expand Down

0 comments on commit bddf395

Please sign in to comment.