diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 18:50:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 18:50:46 -0400 |
commit | a481991467d38afb43c3921d5b5b59ccb61b04ba (patch) | |
tree | a4b0b9a14da6fd5ef7b9b512bb32dbfcfcf2cd71 /drivers/input | |
parent | f6a26ae7699416d86bea8cb68ce413571e9cab3c (diff) | |
parent | cda4db53e9c28061c100400e1a4d273ea61dfba9 (diff) |
Merge tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB 3.5-rc1 changes from Greg Kroah-Hartman:
"Here is the big USB 3.5-rc1 pull request for the 3.5-rc1 merge window.
It's touches a lot of different parts of the kernel, all USB drivers,
due to some API cleanups (getting rid of the ancient err() macro) and
some changes that are needed for USB 3.0 power management updates.
There are also lots of new drivers, pimarily gadget, but others as
well. We deleted a staging driver, which was nice, and finally
dropped the obsolete usbfs code, which will make Al happy to never
have to touch that again.
There were some build errors in the tree that linux-next found a few
days ago, but those were fixed by the most recent changes (all were
due to us not building with CONFIG_PM disabled.)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (477 commits)
xhci: Fix DIV_ROUND_UP compile error.
xhci: Fix compile with CONFIG_USB_SUSPEND=n
USB: Fix core compile with CONFIG_USB_SUSPEND=n
brcm80211: Fix compile error for .disable_hub_initiated_lpm.
Revert "USB: EHCI: work around bug in the Philips ISP1562 controller"
MAINTAINERS: Add myself as maintainer to the USB PHY Layer
USB: EHCI: fix command register configuration lost problem
USB: Remove races in devio.c
USB: ehci-platform: remove update_device
USB: Disable hub-initiated LPM for comms devices.
xhci: Add Intel U1/U2 timeout policy.
xhci: Add infrastructure for host-specific LPM policies.
USB: Add macros for interrupt endpoint types.
xhci: Reserve one command for USB3 LPM disable.
xhci: Some Evaluate Context commands must succeed.
USB: Disable USB 3.0 LPM in critical sections.
USB: Add support to enable/disable USB3 link states.
USB: Allow drivers to disable hub-initiated LPM.
USB: Calculate USB 3.0 exit latencies for LPM.
USB: Refactor code to set LPM support flag.
...
Conflicts:
arch/arm/mach-exynos/mach-nuri.c
arch/arm/mach-exynos/mach-universal_c210.c
drivers/net/wireless/ath/ath6kl/usb.c
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/joystick/iforce/iforce-main.c | 3 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-packets.c | 16 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce-usb.c | 18 | ||||
-rw-r--r-- | drivers/input/joystick/iforce/iforce.h | 1 | ||||
-rw-r--r-- | drivers/input/joystick/xpad.c | 35 | ||||
-rw-r--r-- | drivers/input/misc/cm109.c | 33 | ||||
-rw-r--r-- | drivers/input/misc/keyspan_remote.c | 23 | ||||
-rw-r--r-- | drivers/input/misc/powermate.c | 13 | ||||
-rw-r--r-- | drivers/input/misc/yealink.c | 31 | ||||
-rw-r--r-- | drivers/input/mouse/appletouch.c | 59 | ||||
-rw-r--r-- | drivers/input/mouse/bcm5974.c | 24 | ||||
-rw-r--r-- | drivers/input/tablet/acecad.c | 15 | ||||
-rw-r--r-- | drivers/input/tablet/aiptek.c | 28 | ||||
-rw-r--r-- | drivers/input/tablet/gtco.c | 110 | ||||
-rw-r--r-- | drivers/input/tablet/kbtab.c | 15 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 11 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 16 | ||||
-rw-r--r-- | drivers/input/touchscreen/usbtouchscreen.c | 77 |
18 files changed, 324 insertions, 204 deletions
diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index 405febd94f2..daeeb4c7e3b 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c | |||
@@ -317,7 +317,8 @@ int iforce_init_device(struct iforce *iforce) | |||
317 | break; | 317 | break; |
318 | 318 | ||
319 | if (i == 20) { /* 5 seconds */ | 319 | if (i == 20) { /* 5 seconds */ |
320 | err("Timeout waiting for response from device."); | 320 | dev_err(&input_dev->dev, |
321 | "Timeout waiting for response from device.\n"); | ||
321 | error = -ENODEV; | 322 | error = -ENODEV; |
322 | goto fail; | 323 | goto fail; |
323 | } | 324 | } |
diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index a17b5001600..08f98f2eaf8 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c | |||
@@ -257,7 +257,8 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) | |||
257 | 257 | ||
258 | status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); | 258 | status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); |
259 | if (status) { | 259 | if (status) { |
260 | err("usb_submit_urb failed %d", status); | 260 | dev_err(&iforce->intf->dev, |
261 | "usb_submit_urb failed %d\n", status); | ||
261 | return -1; | 262 | return -1; |
262 | } | 263 | } |
263 | 264 | ||
@@ -265,12 +266,14 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) | |||
265 | iforce->ctrl->status != -EINPROGRESS, HZ); | 266 | iforce->ctrl->status != -EINPROGRESS, HZ); |
266 | 267 | ||
267 | if (iforce->ctrl->status) { | 268 | if (iforce->ctrl->status) { |
268 | dbg("iforce->ctrl->status = %d", iforce->ctrl->status); | 269 | dev_dbg(&iforce->intf->dev, |
270 | "iforce->ctrl->status = %d\n", | ||
271 | iforce->ctrl->status); | ||
269 | usb_unlink_urb(iforce->ctrl); | 272 | usb_unlink_urb(iforce->ctrl); |
270 | return -1; | 273 | return -1; |
271 | } | 274 | } |
272 | #else | 275 | #else |
273 | dbg("iforce_get_id_packet: iforce->bus = USB!"); | 276 | printk(KERN_DEBUG "iforce_get_id_packet: iforce->bus = USB!\n"); |
274 | #endif | 277 | #endif |
275 | } | 278 | } |
276 | break; | 279 | break; |
@@ -289,12 +292,15 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) | |||
289 | return -1; | 292 | return -1; |
290 | } | 293 | } |
291 | #else | 294 | #else |
292 | err("iforce_get_id_packet: iforce->bus = SERIO!"); | 295 | dev_err(&iforce->dev->dev, |
296 | "iforce_get_id_packet: iforce->bus = SERIO!\n"); | ||
293 | #endif | 297 | #endif |
294 | break; | 298 | break; |
295 | 299 | ||
296 | default: | 300 | default: |
297 | err("iforce_get_id_packet: iforce->bus = %d", iforce->bus); | 301 | dev_err(&iforce->dev->dev, |
302 | "iforce_get_id_packet: iforce->bus = %d\n", | ||
303 | iforce->bus); | ||
298 | break; | 304 | break; |
299 | } | 305 | } |
300 | 306 | ||
diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index 6c96631ae5d..d96aa27dfcd 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c | |||
@@ -64,7 +64,7 @@ void iforce_usb_xmit(struct iforce *iforce) | |||
64 | 64 | ||
65 | if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) { | 65 | if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) { |
66 | clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); | 66 | clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); |
67 | dev_warn(&iforce->dev->dev, "usb_submit_urb failed %d\n", n); | 67 | dev_warn(&iforce->intf->dev, "usb_submit_urb failed %d\n", n); |
68 | } | 68 | } |
69 | 69 | ||
70 | /* The IFORCE_XMIT_RUNNING bit is not cleared here. That's intended. | 70 | /* The IFORCE_XMIT_RUNNING bit is not cleared here. That's intended. |
@@ -76,6 +76,7 @@ void iforce_usb_xmit(struct iforce *iforce) | |||
76 | static void iforce_usb_irq(struct urb *urb) | 76 | static void iforce_usb_irq(struct urb *urb) |
77 | { | 77 | { |
78 | struct iforce *iforce = urb->context; | 78 | struct iforce *iforce = urb->context; |
79 | struct device *dev = &iforce->intf->dev; | ||
79 | int status; | 80 | int status; |
80 | 81 | ||
81 | switch (urb->status) { | 82 | switch (urb->status) { |
@@ -86,11 +87,12 @@ static void iforce_usb_irq(struct urb *urb) | |||
86 | case -ENOENT: | 87 | case -ENOENT: |
87 | case -ESHUTDOWN: | 88 | case -ESHUTDOWN: |
88 | /* this urb is terminated, clean up */ | 89 | /* this urb is terminated, clean up */ |
89 | dbg("%s - urb shutting down with status: %d", | 90 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
90 | __func__, urb->status); | 91 | __func__, urb->status); |
91 | return; | 92 | return; |
92 | default: | 93 | default: |
93 | dbg("%s - urb has status of: %d", __func__, urb->status); | 94 | dev_dbg(dev, "%s - urb has status of: %d\n", |
95 | __func__, urb->status); | ||
94 | goto exit; | 96 | goto exit; |
95 | } | 97 | } |
96 | 98 | ||
@@ -100,8 +102,8 @@ static void iforce_usb_irq(struct urb *urb) | |||
100 | exit: | 102 | exit: |
101 | status = usb_submit_urb (urb, GFP_ATOMIC); | 103 | status = usb_submit_urb (urb, GFP_ATOMIC); |
102 | if (status) | 104 | if (status) |
103 | err ("%s - usb_submit_urb failed with result %d", | 105 | dev_err(dev, "%s - usb_submit_urb failed with result %d\n", |
104 | __func__, status); | 106 | __func__, status); |
105 | } | 107 | } |
106 | 108 | ||
107 | static void iforce_usb_out(struct urb *urb) | 109 | static void iforce_usb_out(struct urb *urb) |
@@ -110,7 +112,8 @@ static void iforce_usb_out(struct urb *urb) | |||
110 | 112 | ||
111 | if (urb->status) { | 113 | if (urb->status) { |
112 | clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); | 114 | clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); |
113 | dbg("urb->status %d, exiting", urb->status); | 115 | dev_dbg(&iforce->intf->dev, "urb->status %d, exiting\n", |
116 | urb->status); | ||
114 | return; | 117 | return; |
115 | } | 118 | } |
116 | 119 | ||
@@ -155,6 +158,7 @@ static int iforce_usb_probe(struct usb_interface *intf, | |||
155 | 158 | ||
156 | iforce->bus = IFORCE_USB; | 159 | iforce->bus = IFORCE_USB; |
157 | iforce->usbdev = dev; | 160 | iforce->usbdev = dev; |
161 | iforce->intf = intf; | ||
158 | 162 | ||
159 | iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE; | 163 | iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE; |
160 | iforce->cr.wIndex = 0; | 164 | iforce->cr.wIndex = 0; |
diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h index 9f494b75848..b1d7d9b0eb8 100644 --- a/drivers/input/joystick/iforce/iforce.h +++ b/drivers/input/joystick/iforce/iforce.h | |||
@@ -115,6 +115,7 @@ struct iforce { | |||
115 | #endif | 115 | #endif |
116 | #ifdef CONFIG_JOYSTICK_IFORCE_USB | 116 | #ifdef CONFIG_JOYSTICK_IFORCE_USB |
117 | struct usb_device *usbdev; /* USB transfer */ | 117 | struct usb_device *usbdev; /* USB transfer */ |
118 | struct usb_interface *intf; | ||
118 | struct urb *irq, *out, *ctrl; | 119 | struct urb *irq, *out, *ctrl; |
119 | struct usb_ctrlrequest cr; | 120 | struct usb_ctrlrequest cr; |
120 | #endif | 121 | #endif |
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index fd7a0d5bc94..ee16fb67b7a 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -252,6 +252,7 @@ MODULE_DEVICE_TABLE (usb, xpad_table); | |||
252 | struct usb_xpad { | 252 | struct usb_xpad { |
253 | struct input_dev *dev; /* input device interface */ | 253 | struct input_dev *dev; /* input device interface */ |
254 | struct usb_device *udev; /* usb device */ | 254 | struct usb_device *udev; /* usb device */ |
255 | struct usb_interface *intf; /* usb interface */ | ||
255 | 256 | ||
256 | int pad_present; | 257 | int pad_present; |
257 | 258 | ||
@@ -457,6 +458,7 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha | |||
457 | static void xpad_irq_in(struct urb *urb) | 458 | static void xpad_irq_in(struct urb *urb) |
458 | { | 459 | { |
459 | struct usb_xpad *xpad = urb->context; | 460 | struct usb_xpad *xpad = urb->context; |
461 | struct device *dev = &xpad->intf->dev; | ||
460 | int retval, status; | 462 | int retval, status; |
461 | 463 | ||
462 | status = urb->status; | 464 | status = urb->status; |
@@ -469,11 +471,11 @@ static void xpad_irq_in(struct urb *urb) | |||
469 | case -ENOENT: | 471 | case -ENOENT: |
470 | case -ESHUTDOWN: | 472 | case -ESHUTDOWN: |
471 | /* this urb is terminated, clean up */ | 473 | /* this urb is terminated, clean up */ |
472 | dbg("%s - urb shutting down with status: %d", | 474 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
473 | __func__, status); | 475 | __func__, status); |
474 | return; | 476 | return; |
475 | default: | 477 | default: |
476 | dbg("%s - nonzero urb status received: %d", | 478 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
477 | __func__, status); | 479 | __func__, status); |
478 | goto exit; | 480 | goto exit; |
479 | } | 481 | } |
@@ -492,12 +494,15 @@ static void xpad_irq_in(struct urb *urb) | |||
492 | exit: | 494 | exit: |
493 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 495 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
494 | if (retval) | 496 | if (retval) |
495 | err ("%s - usb_submit_urb failed with result %d", | 497 | dev_err(dev, "%s - usb_submit_urb failed with result %d\n", |
496 | __func__, retval); | 498 | __func__, retval); |
497 | } | 499 | } |
498 | 500 | ||
499 | static void xpad_bulk_out(struct urb *urb) | 501 | static void xpad_bulk_out(struct urb *urb) |
500 | { | 502 | { |
503 | struct usb_xpad *xpad = urb->context; | ||
504 | struct device *dev = &xpad->intf->dev; | ||
505 | |||
501 | switch (urb->status) { | 506 | switch (urb->status) { |
502 | case 0: | 507 | case 0: |
503 | /* success */ | 508 | /* success */ |
@@ -506,16 +511,20 @@ static void xpad_bulk_out(struct urb *urb) | |||
506 | case -ENOENT: | 511 | case -ENOENT: |
507 | case -ESHUTDOWN: | 512 | case -ESHUTDOWN: |
508 | /* this urb is terminated, clean up */ | 513 | /* this urb is terminated, clean up */ |
509 | dbg("%s - urb shutting down with status: %d", __func__, urb->status); | 514 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
515 | __func__, urb->status); | ||
510 | break; | 516 | break; |
511 | default: | 517 | default: |
512 | dbg("%s - nonzero urb status received: %d", __func__, urb->status); | 518 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
519 | __func__, urb->status); | ||
513 | } | 520 | } |
514 | } | 521 | } |
515 | 522 | ||
516 | #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) | 523 | #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) |
517 | static void xpad_irq_out(struct urb *urb) | 524 | static void xpad_irq_out(struct urb *urb) |
518 | { | 525 | { |
526 | struct usb_xpad *xpad = urb->context; | ||
527 | struct device *dev = &xpad->intf->dev; | ||
519 | int retval, status; | 528 | int retval, status; |
520 | 529 | ||
521 | status = urb->status; | 530 | status = urb->status; |
@@ -529,19 +538,21 @@ static void xpad_irq_out(struct urb *urb) | |||
529 | case -ENOENT: | 538 | case -ENOENT: |
530 | case -ESHUTDOWN: | 539 | case -ESHUTDOWN: |
531 | /* this urb is terminated, clean up */ | 540 | /* this urb is terminated, clean up */ |
532 | dbg("%s - urb shutting down with status: %d", __func__, status); | 541 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
542 | __func__, status); | ||
533 | return; | 543 | return; |
534 | 544 | ||
535 | default: | 545 | default: |
536 | dbg("%s - nonzero urb status received: %d", __func__, status); | 546 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
547 | __func__, status); | ||
537 | goto exit; | 548 | goto exit; |
538 | } | 549 | } |
539 | 550 | ||
540 | exit: | 551 | exit: |
541 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 552 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
542 | if (retval) | 553 | if (retval) |
543 | err("%s - usb_submit_urb failed with result %d", | 554 | dev_err(dev, "%s - usb_submit_urb failed with result %d\n", |
544 | __func__, retval); | 555 | __func__, retval); |
545 | } | 556 | } |
546 | 557 | ||
547 | static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad) | 558 | static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad) |
@@ -654,7 +665,8 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect | |||
654 | return usb_submit_urb(xpad->irq_out, GFP_ATOMIC); | 665 | return usb_submit_urb(xpad->irq_out, GFP_ATOMIC); |
655 | 666 | ||
656 | default: | 667 | default: |
657 | dbg("%s - rumble command sent to unsupported xpad type: %d", | 668 | dev_dbg(&xpad->dev->dev, |
669 | "%s - rumble command sent to unsupported xpad type: %d\n", | ||
658 | __func__, xpad->xtype); | 670 | __func__, xpad->xtype); |
659 | return -1; | 671 | return -1; |
660 | } | 672 | } |
@@ -844,6 +856,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id | |||
844 | } | 856 | } |
845 | 857 | ||
846 | xpad->udev = udev; | 858 | xpad->udev = udev; |
859 | xpad->intf = intf; | ||
847 | xpad->mapping = xpad_device[i].mapping; | 860 | xpad->mapping = xpad_device[i].mapping; |
848 | xpad->xtype = xpad_device[i].xtype; | 861 | xpad->xtype = xpad_device[i].xtype; |
849 | 862 | ||
diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c index ab860511f01..082684e7f39 100644 --- a/drivers/input/misc/cm109.c +++ b/drivers/input/misc/cm109.c | |||
@@ -327,7 +327,9 @@ static void cm109_submit_buzz_toggle(struct cm109_dev *dev) | |||
327 | 327 | ||
328 | error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); | 328 | error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); |
329 | if (error) | 329 | if (error) |
330 | err("%s: usb_submit_urb (urb_ctl) failed %d", __func__, error); | 330 | dev_err(&dev->intf->dev, |
331 | "%s: usb_submit_urb (urb_ctl) failed %d\n", | ||
332 | __func__, error); | ||
331 | } | 333 | } |
332 | 334 | ||
333 | /* | 335 | /* |
@@ -339,7 +341,7 @@ static void cm109_urb_irq_callback(struct urb *urb) | |||
339 | const int status = urb->status; | 341 | const int status = urb->status; |
340 | int error; | 342 | int error; |
341 | 343 | ||
342 | dev_dbg(&urb->dev->dev, "### URB IRQ: [0x%02x 0x%02x 0x%02x 0x%02x] keybit=0x%02x\n", | 344 | dev_dbg(&dev->intf->dev, "### URB IRQ: [0x%02x 0x%02x 0x%02x 0x%02x] keybit=0x%02x\n", |
343 | dev->irq_data->byte[0], | 345 | dev->irq_data->byte[0], |
344 | dev->irq_data->byte[1], | 346 | dev->irq_data->byte[1], |
345 | dev->irq_data->byte[2], | 347 | dev->irq_data->byte[2], |
@@ -349,7 +351,7 @@ static void cm109_urb_irq_callback(struct urb *urb) | |||
349 | if (status) { | 351 | if (status) { |
350 | if (status == -ESHUTDOWN) | 352 | if (status == -ESHUTDOWN) |
351 | return; | 353 | return; |
352 | err("%s: urb status %d", __func__, status); | 354 | dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); |
353 | } | 355 | } |
354 | 356 | ||
355 | /* Special keys */ | 357 | /* Special keys */ |
@@ -396,7 +398,8 @@ static void cm109_urb_irq_callback(struct urb *urb) | |||
396 | 398 | ||
397 | error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); | 399 | error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); |
398 | if (error) | 400 | if (error) |
399 | err("%s: usb_submit_urb (urb_ctl) failed %d", | 401 | dev_err(&dev->intf->dev, |
402 | "%s: usb_submit_urb (urb_ctl) failed %d\n", | ||
400 | __func__, error); | 403 | __func__, error); |
401 | } | 404 | } |
402 | 405 | ||
@@ -409,14 +412,14 @@ static void cm109_urb_ctl_callback(struct urb *urb) | |||
409 | const int status = urb->status; | 412 | const int status = urb->status; |
410 | int error; | 413 | int error; |
411 | 414 | ||
412 | dev_dbg(&urb->dev->dev, "### URB CTL: [0x%02x 0x%02x 0x%02x 0x%02x]\n", | 415 | dev_dbg(&dev->intf->dev, "### URB CTL: [0x%02x 0x%02x 0x%02x 0x%02x]\n", |
413 | dev->ctl_data->byte[0], | 416 | dev->ctl_data->byte[0], |
414 | dev->ctl_data->byte[1], | 417 | dev->ctl_data->byte[1], |
415 | dev->ctl_data->byte[2], | 418 | dev->ctl_data->byte[2], |
416 | dev->ctl_data->byte[3]); | 419 | dev->ctl_data->byte[3]); |
417 | 420 | ||
418 | if (status) | 421 | if (status) |
419 | err("%s: urb status %d", __func__, status); | 422 | dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); |
420 | 423 | ||
421 | spin_lock(&dev->ctl_submit_lock); | 424 | spin_lock(&dev->ctl_submit_lock); |
422 | 425 | ||
@@ -433,7 +436,8 @@ static void cm109_urb_ctl_callback(struct urb *urb) | |||
433 | dev->irq_urb_pending = 1; | 436 | dev->irq_urb_pending = 1; |
434 | error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC); | 437 | error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC); |
435 | if (error) | 438 | if (error) |
436 | err("%s: usb_submit_urb (urb_irq) failed %d", | 439 | dev_err(&dev->intf->dev, |
440 | "%s: usb_submit_urb (urb_irq) failed %d\n", | ||
437 | __func__, error); | 441 | __func__, error); |
438 | } | 442 | } |
439 | } | 443 | } |
@@ -476,7 +480,8 @@ static void cm109_toggle_buzzer_sync(struct cm109_dev *dev, int on) | |||
476 | dev->ctl_data, | 480 | dev->ctl_data, |
477 | USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); | 481 | USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); |
478 | if (error < 0 && error != -EINTR) | 482 | if (error < 0 && error != -EINTR) |
479 | err("%s: usb_control_msg() failed %d", __func__, error); | 483 | dev_err(&dev->intf->dev, "%s: usb_control_msg() failed %d\n", |
484 | __func__, error); | ||
480 | } | 485 | } |
481 | 486 | ||
482 | static void cm109_stop_traffic(struct cm109_dev *dev) | 487 | static void cm109_stop_traffic(struct cm109_dev *dev) |
@@ -518,8 +523,8 @@ static int cm109_input_open(struct input_dev *idev) | |||
518 | 523 | ||
519 | error = usb_autopm_get_interface(dev->intf); | 524 | error = usb_autopm_get_interface(dev->intf); |
520 | if (error < 0) { | 525 | if (error < 0) { |
521 | err("%s - cannot autoresume, result %d", | 526 | dev_err(&idev->dev, "%s - cannot autoresume, result %d\n", |
522 | __func__, error); | 527 | __func__, error); |
523 | return error; | 528 | return error; |
524 | } | 529 | } |
525 | 530 | ||
@@ -537,7 +542,8 @@ static int cm109_input_open(struct input_dev *idev) | |||
537 | 542 | ||
538 | error = usb_submit_urb(dev->urb_ctl, GFP_KERNEL); | 543 | error = usb_submit_urb(dev->urb_ctl, GFP_KERNEL); |
539 | if (error) | 544 | if (error) |
540 | err("%s: usb_submit_urb (urb_ctl) failed %d", __func__, error); | 545 | dev_err(&dev->intf->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", |
546 | __func__, error); | ||
541 | else | 547 | else |
542 | dev->open = 1; | 548 | dev->open = 1; |
543 | 549 | ||
@@ -573,7 +579,7 @@ static int cm109_input_ev(struct input_dev *idev, unsigned int type, | |||
573 | { | 579 | { |
574 | struct cm109_dev *dev = input_get_drvdata(idev); | 580 | struct cm109_dev *dev = input_get_drvdata(idev); |
575 | 581 | ||
576 | dev_dbg(&dev->udev->dev, | 582 | dev_dbg(&dev->intf->dev, |
577 | "input_ev: type=%u code=%u value=%d\n", type, code, value); | 583 | "input_ev: type=%u code=%u value=%d\n", type, code, value); |
578 | 584 | ||
579 | if (type != EV_SND) | 585 | if (type != EV_SND) |
@@ -710,7 +716,8 @@ static int cm109_usb_probe(struct usb_interface *intf, | |||
710 | pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); | 716 | pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); |
711 | ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); | 717 | ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); |
712 | if (ret != USB_PKT_LEN) | 718 | if (ret != USB_PKT_LEN) |
713 | err("invalid payload size %d, expected %d", ret, USB_PKT_LEN); | 719 | dev_err(&intf->dev, "invalid payload size %d, expected %d\n", |
720 | ret, USB_PKT_LEN); | ||
714 | 721 | ||
715 | /* initialise irq urb */ | 722 | /* initialise irq urb */ |
716 | usb_fill_int_urb(dev->urb_irq, udev, pipe, dev->irq_data, | 723 | usb_fill_int_urb(dev->urb_irq, udev, pipe, dev->irq_data, |
diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c index d99151a8bf1..290fa5f97de 100644 --- a/drivers/input/misc/keyspan_remote.c +++ b/drivers/input/misc/keyspan_remote.c | |||
@@ -157,7 +157,7 @@ static int keyspan_load_tester(struct usb_keyspan* dev, int bits_needed) | |||
157 | * though so it's not too big a deal | 157 | * though so it's not too big a deal |
158 | */ | 158 | */ |
159 | if (dev->data.pos >= dev->data.len) { | 159 | if (dev->data.pos >= dev->data.len) { |
160 | dev_dbg(&dev->udev->dev, | 160 | dev_dbg(&dev->interface->dev, |
161 | "%s - Error ran out of data. pos: %d, len: %d\n", | 161 | "%s - Error ran out of data. pos: %d, len: %d\n", |
162 | __func__, dev->data.pos, dev->data.len); | 162 | __func__, dev->data.pos, dev->data.len); |
163 | return -1; | 163 | return -1; |
@@ -267,7 +267,9 @@ static void keyspan_check_data(struct usb_keyspan *remote) | |||
267 | remote->data.tester = remote->data.tester >> 6; | 267 | remote->data.tester = remote->data.tester >> 6; |
268 | remote->data.bits_left -= 6; | 268 | remote->data.bits_left -= 6; |
269 | } else { | 269 | } else { |
270 | err("%s - Unknown sequence found in system data.\n", __func__); | 270 | dev_err(&remote->interface->dev, |
271 | "%s - Unknown sequence found in system data.\n", | ||
272 | __func__); | ||
271 | remote->stage = 0; | 273 | remote->stage = 0; |
272 | return; | 274 | return; |
273 | } | 275 | } |
@@ -286,7 +288,9 @@ static void keyspan_check_data(struct usb_keyspan *remote) | |||
286 | remote->data.tester = remote->data.tester >> 6; | 288 | remote->data.tester = remote->data.tester >> 6; |
287 | remote->data.bits_left -= 6; | 289 | remote->data.bits_left -= 6; |
288 | } else { | 290 | } else { |
289 | err("%s - Unknown sequence found in button data.\n", __func__); | 291 | dev_err(&remote->interface->dev, |
292 | "%s - Unknown sequence found in button data.\n", | ||
293 | __func__); | ||
290 | remote->stage = 0; | 294 | remote->stage = 0; |
291 | return; | 295 | return; |
292 | } | 296 | } |
@@ -302,7 +306,9 @@ static void keyspan_check_data(struct usb_keyspan *remote) | |||
302 | remote->data.tester = remote->data.tester >> 6; | 306 | remote->data.tester = remote->data.tester >> 6; |
303 | remote->data.bits_left -= 6; | 307 | remote->data.bits_left -= 6; |
304 | } else { | 308 | } else { |
305 | err("%s - Error in message, invalid toggle.\n", __func__); | 309 | dev_err(&remote->interface->dev, |
310 | "%s - Error in message, invalid toggle.\n", | ||
311 | __func__); | ||
306 | remote->stage = 0; | 312 | remote->stage = 0; |
307 | return; | 313 | return; |
308 | } | 314 | } |
@@ -312,10 +318,11 @@ static void keyspan_check_data(struct usb_keyspan *remote) | |||
312 | remote->data.tester = remote->data.tester >> 5; | 318 | remote->data.tester = remote->data.tester >> 5; |
313 | remote->data.bits_left -= 5; | 319 | remote->data.bits_left -= 5; |
314 | } else { | 320 | } else { |
315 | err("Bad message received, no stop bit found.\n"); | 321 | dev_err(&remote->interface->dev, |
322 | "Bad message received, no stop bit found.\n"); | ||
316 | } | 323 | } |
317 | 324 | ||
318 | dev_dbg(&remote->udev->dev, | 325 | dev_dbg(&remote->interface->dev, |
319 | "%s found valid message: system: %d, button: %d, toggle: %d\n", | 326 | "%s found valid message: system: %d, button: %d, toggle: %d\n", |
320 | __func__, message.system, message.button, message.toggle); | 327 | __func__, message.system, message.button, message.toggle); |
321 | 328 | ||
@@ -397,7 +404,9 @@ static void keyspan_irq_recv(struct urb *urb) | |||
397 | resubmit: | 404 | resubmit: |
398 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 405 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
399 | if (retval) | 406 | if (retval) |
400 | err ("%s - usb_submit_urb failed with result: %d", __func__, retval); | 407 | dev_err(&dev->interface->dev, |
408 | "%s - usb_submit_urb failed with result: %d\n", | ||
409 | __func__, retval); | ||
401 | } | 410 | } |
402 | 411 | ||
403 | static int keyspan_open(struct input_dev *dev) | 412 | static int keyspan_open(struct input_dev *dev) |
diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index 538f7049ec6..49c0c3ebd32 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c | |||
@@ -65,6 +65,7 @@ struct powermate_device { | |||
65 | struct urb *irq, *config; | 65 | struct urb *irq, *config; |
66 | struct usb_ctrlrequest *configcr; | 66 | struct usb_ctrlrequest *configcr; |
67 | struct usb_device *udev; | 67 | struct usb_device *udev; |
68 | struct usb_interface *intf; | ||
68 | struct input_dev *input; | 69 | struct input_dev *input; |
69 | spinlock_t lock; | 70 | spinlock_t lock; |
70 | int static_brightness; | 71 | int static_brightness; |
@@ -85,6 +86,7 @@ static void powermate_config_complete(struct urb *urb); | |||
85 | static void powermate_irq(struct urb *urb) | 86 | static void powermate_irq(struct urb *urb) |
86 | { | 87 | { |
87 | struct powermate_device *pm = urb->context; | 88 | struct powermate_device *pm = urb->context; |
89 | struct device *dev = &pm->intf->dev; | ||
88 | int retval; | 90 | int retval; |
89 | 91 | ||
90 | switch (urb->status) { | 92 | switch (urb->status) { |
@@ -95,10 +97,12 @@ static void powermate_irq(struct urb *urb) | |||
95 | case -ENOENT: | 97 | case -ENOENT: |
96 | case -ESHUTDOWN: | 98 | case -ESHUTDOWN: |
97 | /* this urb is terminated, clean up */ | 99 | /* this urb is terminated, clean up */ |
98 | dbg("%s - urb shutting down with status: %d", __func__, urb->status); | 100 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
101 | __func__, urb->status); | ||
99 | return; | 102 | return; |
100 | default: | 103 | default: |
101 | dbg("%s - nonzero urb status received: %d", __func__, urb->status); | 104 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
105 | __func__, urb->status); | ||
102 | goto exit; | 106 | goto exit; |
103 | } | 107 | } |
104 | 108 | ||
@@ -110,8 +114,8 @@ static void powermate_irq(struct urb *urb) | |||
110 | exit: | 114 | exit: |
111 | retval = usb_submit_urb (urb, GFP_ATOMIC); | 115 | retval = usb_submit_urb (urb, GFP_ATOMIC); |
112 | if (retval) | 116 | if (retval) |
113 | err ("%s - usb_submit_urb failed with result %d", | 117 | dev_err(dev, "%s - usb_submit_urb failed with result: %d\n", |
114 | __func__, retval); | 118 | __func__, retval); |
115 | } | 119 | } |
116 | 120 | ||
117 | /* Decide if we need to issue a control message and do so. Must be called with pm->lock taken */ | 121 | /* Decide if we need to issue a control message and do so. Must be called with pm->lock taken */ |
@@ -330,6 +334,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i | |||
330 | goto fail3; | 334 | goto fail3; |
331 | 335 | ||
332 | pm->udev = udev; | 336 | pm->udev = udev; |
337 | pm->intf = intf; | ||
333 | pm->input = input_dev; | 338 | pm->input = input_dev; |
334 | 339 | ||
335 | usb_make_path(udev, pm->phys, sizeof(pm->phys)); | 340 | usb_make_path(udev, pm->phys, sizeof(pm->phys)); |
diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index f4776e7f8c1..285a5bd6cbc 100644 --- a/drivers/input/misc/yealink.c +++ b/drivers/input/misc/yealink.c | |||
@@ -101,6 +101,7 @@ static const struct lcd_segment_map { | |||
101 | struct yealink_dev { | 101 | struct yealink_dev { |
102 | struct input_dev *idev; /* input device */ | 102 | struct input_dev *idev; /* input device */ |
103 | struct usb_device *udev; /* usb device */ | 103 | struct usb_device *udev; /* usb device */ |
104 | struct usb_interface *intf; /* usb interface */ | ||
104 | 105 | ||
105 | /* irq input channel */ | 106 | /* irq input channel */ |
106 | struct yld_ctl_packet *irq_data; | 107 | struct yld_ctl_packet *irq_data; |
@@ -428,7 +429,8 @@ static void urb_irq_callback(struct urb *urb) | |||
428 | int ret, status = urb->status; | 429 | int ret, status = urb->status; |
429 | 430 | ||
430 | if (status) | 431 | if (status) |
431 | err("%s - urb status %d", __func__, status); | 432 | dev_err(&yld->intf->dev, "%s - urb status %d\n", |
433 | __func__, status); | ||
432 | 434 | ||
433 | switch (yld->irq_data->cmd) { | 435 | switch (yld->irq_data->cmd) { |
434 | case CMD_KEYPRESS: | 436 | case CMD_KEYPRESS: |
@@ -437,13 +439,15 @@ static void urb_irq_callback(struct urb *urb) | |||
437 | break; | 439 | break; |
438 | 440 | ||
439 | case CMD_SCANCODE: | 441 | case CMD_SCANCODE: |
440 | dbg("get scancode %x", yld->irq_data->data[0]); | 442 | dev_dbg(&yld->intf->dev, "get scancode %x\n", |
443 | yld->irq_data->data[0]); | ||
441 | 444 | ||
442 | report_key(yld, map_p1k_to_key(yld->irq_data->data[0])); | 445 | report_key(yld, map_p1k_to_key(yld->irq_data->data[0])); |
443 | break; | 446 | break; |
444 | 447 | ||
445 | default: | 448 | default: |
446 | err("unexpected response %x", yld->irq_data->cmd); | 449 | dev_err(&yld->intf->dev, "unexpected response %x\n", |
450 | yld->irq_data->cmd); | ||
447 | } | 451 | } |
448 | 452 | ||
449 | yealink_do_idle_tasks(yld); | 453 | yealink_do_idle_tasks(yld); |
@@ -451,7 +455,9 @@ static void urb_irq_callback(struct urb *urb) | |||
451 | if (!yld->shutdown) { | 455 | if (!yld->shutdown) { |
452 | ret = usb_submit_urb(yld->urb_ctl, GFP_ATOMIC); | 456 | ret = usb_submit_urb(yld->urb_ctl, GFP_ATOMIC); |
453 | if (ret && ret != -EPERM) | 457 | if (ret && ret != -EPERM) |
454 | err("%s - usb_submit_urb failed %d", __func__, ret); | 458 | dev_err(&yld->intf->dev, |
459 | "%s - usb_submit_urb failed %d\n", | ||
460 | __func__, ret); | ||
455 | } | 461 | } |
456 | } | 462 | } |
457 | 463 | ||
@@ -461,7 +467,8 @@ static void urb_ctl_callback(struct urb *urb) | |||
461 | int ret = 0, status = urb->status; | 467 | int ret = 0, status = urb->status; |
462 | 468 | ||
463 | if (status) | 469 | if (status) |
464 | err("%s - urb status %d", __func__, status); | 470 | dev_err(&yld->intf->dev, "%s - urb status %d\n", |
471 | __func__, status); | ||
465 | 472 | ||
466 | switch (yld->ctl_data->cmd) { | 473 | switch (yld->ctl_data->cmd) { |
467 | case CMD_KEYPRESS: | 474 | case CMD_KEYPRESS: |
@@ -479,7 +486,8 @@ static void urb_ctl_callback(struct urb *urb) | |||
479 | } | 486 | } |
480 | 487 | ||
481 | if (ret && ret != -EPERM) | 488 | if (ret && ret != -EPERM) |
482 | err("%s - usb_submit_urb failed %d", __func__, ret); | 489 | dev_err(&yld->intf->dev, "%s - usb_submit_urb failed %d\n", |
490 | __func__, ret); | ||
483 | } | 491 | } |
484 | 492 | ||
485 | /******************************************************************************* | 493 | /******************************************************************************* |
@@ -511,7 +519,7 @@ static int input_open(struct input_dev *dev) | |||
511 | struct yealink_dev *yld = input_get_drvdata(dev); | 519 | struct yealink_dev *yld = input_get_drvdata(dev); |
512 | int i, ret; | 520 | int i, ret; |
513 | 521 | ||
514 | dbg("%s", __func__); | 522 | dev_dbg(&yld->intf->dev, "%s\n", __func__); |
515 | 523 | ||
516 | /* force updates to device */ | 524 | /* force updates to device */ |
517 | for (i = 0; i<sizeof(yld->master); i++) | 525 | for (i = 0; i<sizeof(yld->master); i++) |
@@ -526,8 +534,9 @@ static int input_open(struct input_dev *dev) | |||
526 | yld->ctl_data->size = 10; | 534 | yld->ctl_data->size = 10; |
527 | yld->ctl_data->sum = 0x100-CMD_INIT-10; | 535 | yld->ctl_data->sum = 0x100-CMD_INIT-10; |
528 | if ((ret = usb_submit_urb(yld->urb_ctl, GFP_KERNEL)) != 0) { | 536 | if ((ret = usb_submit_urb(yld->urb_ctl, GFP_KERNEL)) != 0) { |
529 | dbg("%s - usb_submit_urb failed with result %d", | 537 | dev_dbg(&yld->intf->dev, |
530 | __func__, ret); | 538 | "%s - usb_submit_urb failed with result %d\n", |
539 | __func__, ret); | ||
531 | return ret; | 540 | return ret; |
532 | } | 541 | } |
533 | return 0; | 542 | return 0; |
@@ -876,6 +885,7 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
876 | return -ENOMEM; | 885 | return -ENOMEM; |
877 | 886 | ||
878 | yld->udev = udev; | 887 | yld->udev = udev; |
888 | yld->intf = intf; | ||
879 | 889 | ||
880 | yld->idev = input_dev = input_allocate_device(); | 890 | yld->idev = input_dev = input_allocate_device(); |
881 | if (!input_dev) | 891 | if (!input_dev) |
@@ -909,7 +919,8 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
909 | pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); | 919 | pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); |
910 | ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); | 920 | ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); |
911 | if (ret != USB_PKT_LEN) | 921 | if (ret != USB_PKT_LEN) |
912 | err("invalid payload size %d, expected %zd", ret, USB_PKT_LEN); | 922 | dev_err(&intf->dev, "invalid payload size %d, expected %zd\n", |
923 | ret, USB_PKT_LEN); | ||
913 | 924 | ||
914 | /* initialise irq urb */ | 925 | /* initialise irq urb */ |
915 | usb_fill_int_urb(yld->urb_irq, udev, pipe, yld->irq_data, | 926 | usb_fill_int_urb(yld->urb_irq, udev, pipe, yld->irq_data, |
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 0acbc7d50d0..e42f1fa8cdc 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c | |||
@@ -195,6 +195,7 @@ enum atp_status_bits { | |||
195 | struct atp { | 195 | struct atp { |
196 | char phys[64]; | 196 | char phys[64]; |
197 | struct usb_device *udev; /* usb device */ | 197 | struct usb_device *udev; /* usb device */ |
198 | struct usb_interface *intf; /* usb interface */ | ||
198 | struct urb *urb; /* usb request block */ | 199 | struct urb *urb; /* usb request block */ |
199 | u8 *data; /* transferred data */ | 200 | u8 *data; /* transferred data */ |
200 | struct input_dev *input; /* input dev */ | 201 | struct input_dev *input; /* input dev */ |
@@ -253,8 +254,9 @@ MODULE_PARM_DESC(debug, "Activate debugging output"); | |||
253 | * packets (Report ID 2). This code changes device mode, so it | 254 | * packets (Report ID 2). This code changes device mode, so it |
254 | * sends raw sensor reports (Report ID 5). | 255 | * sends raw sensor reports (Report ID 5). |
255 | */ | 256 | */ |
256 | static int atp_geyser_init(struct usb_device *udev) | 257 | static int atp_geyser_init(struct atp *dev) |
257 | { | 258 | { |
259 | struct usb_device *udev = dev->udev; | ||
258 | char *data; | 260 | char *data; |
259 | int size; | 261 | int size; |
260 | int i; | 262 | int i; |
@@ -262,7 +264,7 @@ static int atp_geyser_init(struct usb_device *udev) | |||
262 | 264 | ||
263 | data = kmalloc(8, GFP_KERNEL); | 265 | data = kmalloc(8, GFP_KERNEL); |
264 | if (!data) { | 266 | if (!data) { |
265 | err("Out of memory"); | 267 | dev_err(&dev->intf->dev, "Out of memory\n"); |
266 | return -ENOMEM; | 268 | return -ENOMEM; |
267 | } | 269 | } |
268 | 270 | ||
@@ -277,7 +279,7 @@ static int atp_geyser_init(struct usb_device *udev) | |||
277 | for (i = 0; i < 8; i++) | 279 | for (i = 0; i < 8; i++) |
278 | dprintk("appletouch[%d]: %d\n", i, data[i]); | 280 | dprintk("appletouch[%d]: %d\n", i, data[i]); |
279 | 281 | ||
280 | err("Failed to read mode from device."); | 282 | dev_err(&dev->intf->dev, "Failed to read mode from device.\n"); |
281 | ret = -EIO; | 283 | ret = -EIO; |
282 | goto out_free; | 284 | goto out_free; |
283 | } | 285 | } |
@@ -296,7 +298,7 @@ static int atp_geyser_init(struct usb_device *udev) | |||
296 | for (i = 0; i < 8; i++) | 298 | for (i = 0; i < 8; i++) |
297 | dprintk("appletouch[%d]: %d\n", i, data[i]); | 299 | dprintk("appletouch[%d]: %d\n", i, data[i]); |
298 | 300 | ||
299 | err("Failed to request geyser raw mode"); | 301 | dev_err(&dev->intf->dev, "Failed to request geyser raw mode\n"); |
300 | ret = -EIO; | 302 | ret = -EIO; |
301 | goto out_free; | 303 | goto out_free; |
302 | } | 304 | } |
@@ -313,16 +315,16 @@ out_free: | |||
313 | static void atp_reinit(struct work_struct *work) | 315 | static void atp_reinit(struct work_struct *work) |
314 | { | 316 | { |
315 | struct atp *dev = container_of(work, struct atp, work); | 317 | struct atp *dev = container_of(work, struct atp, work); |
316 | struct usb_device *udev = dev->udev; | ||
317 | int retval; | 318 | int retval; |
318 | 319 | ||
319 | dprintk("appletouch: putting appletouch to sleep (reinit)\n"); | 320 | dprintk("appletouch: putting appletouch to sleep (reinit)\n"); |
320 | atp_geyser_init(udev); | 321 | atp_geyser_init(dev); |
321 | 322 | ||
322 | retval = usb_submit_urb(dev->urb, GFP_ATOMIC); | 323 | retval = usb_submit_urb(dev->urb, GFP_ATOMIC); |
323 | if (retval) | 324 | if (retval) |
324 | err("atp_reinit: usb_submit_urb failed with error %d", | 325 | dev_err(&dev->intf->dev, |
325 | retval); | 326 | "atp_reinit: usb_submit_urb failed with error %d\n", |
327 | retval); | ||
326 | } | 328 | } |
327 | 329 | ||
328 | static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact, | 330 | static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact, |
@@ -400,6 +402,7 @@ static inline void atp_report_fingers(struct input_dev *input, int fingers) | |||
400 | static int atp_status_check(struct urb *urb) | 402 | static int atp_status_check(struct urb *urb) |
401 | { | 403 | { |
402 | struct atp *dev = urb->context; | 404 | struct atp *dev = urb->context; |
405 | struct usb_interface *intf = dev->intf; | ||
403 | 406 | ||
404 | switch (urb->status) { | 407 | switch (urb->status) { |
405 | case 0: | 408 | case 0: |
@@ -407,8 +410,8 @@ static int atp_status_check(struct urb *urb) | |||
407 | break; | 410 | break; |
408 | case -EOVERFLOW: | 411 | case -EOVERFLOW: |
409 | if (!dev->overflow_warned) { | 412 | if (!dev->overflow_warned) { |
410 | printk(KERN_WARNING "appletouch: OVERFLOW with data " | 413 | dev_warn(&intf->dev, |
411 | "length %d, actual length is %d\n", | 414 | "appletouch: OVERFLOW with data length %d, actual length is %d\n", |
412 | dev->info->datalen, dev->urb->actual_length); | 415 | dev->info->datalen, dev->urb->actual_length); |
413 | dev->overflow_warned = true; | 416 | dev->overflow_warned = true; |
414 | } | 417 | } |
@@ -416,13 +419,15 @@ static int atp_status_check(struct urb *urb) | |||
416 | case -ENOENT: | 419 | case -ENOENT: |
417 | case -ESHUTDOWN: | 420 | case -ESHUTDOWN: |
418 | /* This urb is terminated, clean up */ | 421 | /* This urb is terminated, clean up */ |
419 | dbg("atp_complete: urb shutting down with status: %d", | 422 | dev_dbg(&intf->dev, |
420 | urb->status); | 423 | "atp_complete: urb shutting down with status: %d\n", |
424 | urb->status); | ||
421 | return ATP_URB_STATUS_ERROR_FATAL; | 425 | return ATP_URB_STATUS_ERROR_FATAL; |
422 | 426 | ||
423 | default: | 427 | default: |
424 | dbg("atp_complete: nonzero urb status received: %d", | 428 | dev_dbg(&intf->dev, |
425 | urb->status); | 429 | "atp_complete: nonzero urb status received: %d\n", |
430 | urb->status); | ||
426 | return ATP_URB_STATUS_ERROR; | 431 | return ATP_URB_STATUS_ERROR; |
427 | } | 432 | } |
428 | 433 | ||
@@ -445,7 +450,8 @@ static void atp_detect_size(struct atp *dev) | |||
445 | for (i = dev->info->xsensors; i < ATP_XSENSORS; i++) { | 450 | for (i = dev->info->xsensors; i < ATP_XSENSORS; i++) { |
446 | if (dev->xy_cur[i]) { | 451 | if (dev->xy_cur[i]) { |
447 | 452 | ||
448 | printk(KERN_INFO "appletouch: 17\" model detected.\n"); | 453 | dev_info(&dev->intf->dev, |
454 | "appletouch: 17\" model detected.\n"); | ||
449 | 455 | ||
450 | input_set_abs_params(dev->input, ABS_X, 0, | 456 | input_set_abs_params(dev->input, ABS_X, 0, |
451 | (dev->info->xsensors_17 - 1) * | 457 | (dev->info->xsensors_17 - 1) * |
@@ -588,8 +594,9 @@ static void atp_complete_geyser_1_2(struct urb *urb) | |||
588 | exit: | 594 | exit: |
589 | retval = usb_submit_urb(dev->urb, GFP_ATOMIC); | 595 | retval = usb_submit_urb(dev->urb, GFP_ATOMIC); |
590 | if (retval) | 596 | if (retval) |
591 | err("atp_complete: usb_submit_urb failed with result %d", | 597 | dev_err(&dev->intf->dev, |
592 | retval); | 598 | "atp_complete: usb_submit_urb failed with result %d\n", |
599 | retval); | ||
593 | } | 600 | } |
594 | 601 | ||
595 | /* Interrupt function for older touchpads: GEYSER3/GEYSER4 */ | 602 | /* Interrupt function for older touchpads: GEYSER3/GEYSER4 */ |
@@ -722,8 +729,9 @@ static void atp_complete_geyser_3_4(struct urb *urb) | |||
722 | exit: | 729 | exit: |
723 | retval = usb_submit_urb(dev->urb, GFP_ATOMIC); | 730 | retval = usb_submit_urb(dev->urb, GFP_ATOMIC); |
724 | if (retval) | 731 | if (retval) |
725 | err("atp_complete: usb_submit_urb failed with result %d", | 732 | dev_err(&dev->intf->dev, |
726 | retval); | 733 | "atp_complete: usb_submit_urb failed with result %d\n", |
734 | retval); | ||
727 | } | 735 | } |
728 | 736 | ||
729 | static int atp_open(struct input_dev *input) | 737 | static int atp_open(struct input_dev *input) |
@@ -748,14 +756,12 @@ static void atp_close(struct input_dev *input) | |||
748 | 756 | ||
749 | static int atp_handle_geyser(struct atp *dev) | 757 | static int atp_handle_geyser(struct atp *dev) |
750 | { | 758 | { |
751 | struct usb_device *udev = dev->udev; | ||
752 | |||
753 | if (dev->info != &fountain_info) { | 759 | if (dev->info != &fountain_info) { |
754 | /* switch to raw sensor mode */ | 760 | /* switch to raw sensor mode */ |
755 | if (atp_geyser_init(udev)) | 761 | if (atp_geyser_init(dev)) |
756 | return -EIO; | 762 | return -EIO; |
757 | 763 | ||
758 | printk(KERN_INFO "appletouch: Geyser mode initialized.\n"); | 764 | dev_info(&dev->intf->dev, "Geyser mode initialized.\n"); |
759 | } | 765 | } |
760 | 766 | ||
761 | return 0; | 767 | return 0; |
@@ -785,7 +791,7 @@ static int atp_probe(struct usb_interface *iface, | |||
785 | } | 791 | } |
786 | } | 792 | } |
787 | if (!int_in_endpointAddr) { | 793 | if (!int_in_endpointAddr) { |
788 | err("Could not find int-in endpoint"); | 794 | dev_err(&iface->dev, "Could not find int-in endpoint\n"); |
789 | return -EIO; | 795 | return -EIO; |
790 | } | 796 | } |
791 | 797 | ||
@@ -793,11 +799,12 @@ static int atp_probe(struct usb_interface *iface, | |||
793 | dev = kzalloc(sizeof(struct atp), GFP_KERNEL); | 799 | dev = kzalloc(sizeof(struct atp), GFP_KERNEL); |
794 | input_dev = input_allocate_device(); | 800 | input_dev = input_allocate_device(); |
795 | if (!dev || !input_dev) { | 801 | if (!dev || !input_dev) { |
796 | err("Out of memory"); | 802 | dev_err(&iface->dev, "Out of memory\n"); |
797 | goto err_free_devs; | 803 | goto err_free_devs; |
798 | } | 804 | } |
799 | 805 | ||
800 | dev->udev = udev; | 806 | dev->udev = udev; |
807 | dev->intf = iface; | ||
801 | dev->input = input_dev; | 808 | dev->input = input_dev; |
802 | dev->info = info; | 809 | dev->info = info; |
803 | dev->overflow_warned = false; | 810 | dev->overflow_warned = false; |
@@ -886,7 +893,7 @@ static void atp_disconnect(struct usb_interface *iface) | |||
886 | usb_free_urb(dev->urb); | 893 | usb_free_urb(dev->urb); |
887 | kfree(dev); | 894 | kfree(dev); |
888 | } | 895 | } |
889 | printk(KERN_INFO "input: appletouch disconnected\n"); | 896 | dev_info(&iface->dev, "input: appletouch disconnected\n"); |
890 | } | 897 | } |
891 | 898 | ||
892 | static int atp_recover(struct atp *dev) | 899 | static int atp_recover(struct atp *dev) |
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index f9e2758b9f4..2cf681d98c0 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
@@ -584,7 +584,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) | |||
584 | int retval = 0, size; | 584 | int retval = 0, size; |
585 | 585 | ||
586 | if (!data) { | 586 | if (!data) { |
587 | err("bcm5974: out of memory"); | 587 | dev_err(&dev->intf->dev, "out of memory\n"); |
588 | retval = -ENOMEM; | 588 | retval = -ENOMEM; |
589 | goto out; | 589 | goto out; |
590 | } | 590 | } |
@@ -597,7 +597,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) | |||
597 | BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); | 597 | BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); |
598 | 598 | ||
599 | if (size != 8) { | 599 | if (size != 8) { |
600 | err("bcm5974: could not read from device"); | 600 | dev_err(&dev->intf->dev, "could not read from device\n"); |
601 | retval = -EIO; | 601 | retval = -EIO; |
602 | goto out; | 602 | goto out; |
603 | } | 603 | } |
@@ -615,7 +615,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) | |||
615 | BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); | 615 | BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); |
616 | 616 | ||
617 | if (size != 8) { | 617 | if (size != 8) { |
618 | err("bcm5974: could not write to device"); | 618 | dev_err(&dev->intf->dev, "could not write to device\n"); |
619 | retval = -EIO; | 619 | retval = -EIO; |
620 | goto out; | 620 | goto out; |
621 | } | 621 | } |
@@ -631,6 +631,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) | |||
631 | static void bcm5974_irq_button(struct urb *urb) | 631 | static void bcm5974_irq_button(struct urb *urb) |
632 | { | 632 | { |
633 | struct bcm5974 *dev = urb->context; | 633 | struct bcm5974 *dev = urb->context; |
634 | struct usb_interface *intf = dev->intf; | ||
634 | int error; | 635 | int error; |
635 | 636 | ||
636 | switch (urb->status) { | 637 | switch (urb->status) { |
@@ -640,10 +641,11 @@ static void bcm5974_irq_button(struct urb *urb) | |||
640 | case -ECONNRESET: | 641 | case -ECONNRESET: |
641 | case -ENOENT: | 642 | case -ENOENT: |
642 | case -ESHUTDOWN: | 643 | case -ESHUTDOWN: |
643 | dbg("bcm5974: button urb shutting down: %d", urb->status); | 644 | dev_dbg(&intf->dev, "button urb shutting down: %d\n", |
645 | urb->status); | ||
644 | return; | 646 | return; |
645 | default: | 647 | default: |
646 | dbg("bcm5974: button urb status: %d", urb->status); | 648 | dev_dbg(&intf->dev, "button urb status: %d\n", urb->status); |
647 | goto exit; | 649 | goto exit; |
648 | } | 650 | } |
649 | 651 | ||
@@ -654,12 +656,13 @@ static void bcm5974_irq_button(struct urb *urb) | |||
654 | exit: | 656 | exit: |
655 | error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC); | 657 | error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC); |
656 | if (error) | 658 | if (error) |
657 | err("bcm5974: button urb failed: %d", error); | 659 | dev_err(&intf->dev, "button urb failed: %d\n", error); |
658 | } | 660 | } |
659 | 661 | ||
660 | static void bcm5974_irq_trackpad(struct urb *urb) | 662 | static void bcm5974_irq_trackpad(struct urb *urb) |
661 | { | 663 | { |
662 | struct bcm5974 *dev = urb->context; | 664 | struct bcm5974 *dev = urb->context; |
665 | struct usb_interface *intf = dev->intf; | ||
663 | int error; | 666 | int error; |
664 | 667 | ||
665 | switch (urb->status) { | 668 | switch (urb->status) { |
@@ -669,10 +672,11 @@ static void bcm5974_irq_trackpad(struct urb *urb) | |||
669 | case -ECONNRESET: | 672 | case -ECONNRESET: |
670 | case -ENOENT: | 673 | case -ENOENT: |
671 | case -ESHUTDOWN: | 674 | case -ESHUTDOWN: |
672 | dbg("bcm5974: trackpad urb shutting down: %d", urb->status); | 675 | dev_dbg(&intf->dev, "trackpad urb shutting down: %d\n", |
676 | urb->status); | ||
673 | return; | 677 | return; |
674 | default: | 678 | default: |
675 | dbg("bcm5974: trackpad urb status: %d", urb->status); | 679 | dev_dbg(&intf->dev, "trackpad urb status: %d\n", urb->status); |
676 | goto exit; | 680 | goto exit; |
677 | } | 681 | } |
678 | 682 | ||
@@ -687,7 +691,7 @@ static void bcm5974_irq_trackpad(struct urb *urb) | |||
687 | exit: | 691 | exit: |
688 | error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC); | 692 | error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC); |
689 | if (error) | 693 | if (error) |
690 | err("bcm5974: trackpad urb failed: %d", error); | 694 | dev_err(&intf->dev, "trackpad urb failed: %d\n", error); |
691 | } | 695 | } |
692 | 696 | ||
693 | /* | 697 | /* |
@@ -833,7 +837,7 @@ static int bcm5974_probe(struct usb_interface *iface, | |||
833 | dev = kzalloc(sizeof(struct bcm5974), GFP_KERNEL); | 837 | dev = kzalloc(sizeof(struct bcm5974), GFP_KERNEL); |
834 | input_dev = input_allocate_device(); | 838 | input_dev = input_allocate_device(); |
835 | if (!dev || !input_dev) { | 839 | if (!dev || !input_dev) { |
836 | err("bcm5974: out of memory"); | 840 | dev_err(&iface->dev, "out of memory\n"); |
837 | goto err_free_devs; | 841 | goto err_free_devs; |
838 | } | 842 | } |
839 | 843 | ||
diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index f8b0b1df913..e062ec899ca 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c | |||
@@ -51,6 +51,7 @@ struct usb_acecad { | |||
51 | char name[128]; | 51 | char name[128]; |
52 | char phys[64]; | 52 | char phys[64]; |
53 | struct usb_device *usbdev; | 53 | struct usb_device *usbdev; |
54 | struct usb_interface *intf; | ||
54 | struct input_dev *input; | 55 | struct input_dev *input; |
55 | struct urb *irq; | 56 | struct urb *irq; |
56 | 57 | ||
@@ -63,6 +64,7 @@ static void usb_acecad_irq(struct urb *urb) | |||
63 | struct usb_acecad *acecad = urb->context; | 64 | struct usb_acecad *acecad = urb->context; |
64 | unsigned char *data = acecad->data; | 65 | unsigned char *data = acecad->data; |
65 | struct input_dev *dev = acecad->input; | 66 | struct input_dev *dev = acecad->input; |
67 | struct usb_interface *intf = acecad->intf; | ||
66 | int prox, status; | 68 | int prox, status; |
67 | 69 | ||
68 | switch (urb->status) { | 70 | switch (urb->status) { |
@@ -73,10 +75,12 @@ static void usb_acecad_irq(struct urb *urb) | |||
73 | case -ENOENT: | 75 | case -ENOENT: |
74 | case -ESHUTDOWN: | 76 | case -ESHUTDOWN: |
75 | /* this urb is terminated, clean up */ | 77 | /* this urb is terminated, clean up */ |
76 | dbg("%s - urb shutting down with status: %d", __func__, urb->status); | 78 | dev_dbg(&intf->dev, "%s - urb shutting down with status: %d\n", |
79 | __func__, urb->status); | ||
77 | return; | 80 | return; |
78 | default: | 81 | default: |
79 | dbg("%s - nonzero urb status received: %d", __func__, urb->status); | 82 | dev_dbg(&intf->dev, "%s - nonzero urb status received: %d\n", |
83 | __func__, urb->status); | ||
80 | goto resubmit; | 84 | goto resubmit; |
81 | } | 85 | } |
82 | 86 | ||
@@ -105,8 +109,10 @@ static void usb_acecad_irq(struct urb *urb) | |||
105 | resubmit: | 109 | resubmit: |
106 | status = usb_submit_urb(urb, GFP_ATOMIC); | 110 | status = usb_submit_urb(urb, GFP_ATOMIC); |
107 | if (status) | 111 | if (status) |
108 | err("can't resubmit intr, %s-%s/input0, status %d", | 112 | dev_err(&intf->dev, |
109 | acecad->usbdev->bus->bus_name, acecad->usbdev->devpath, status); | 113 | "can't resubmit intr, %s-%s/input0, status %d\n", |
114 | acecad->usbdev->bus->bus_name, | ||
115 | acecad->usbdev->devpath, status); | ||
110 | } | 116 | } |
111 | 117 | ||
112 | static int usb_acecad_open(struct input_dev *dev) | 118 | static int usb_acecad_open(struct input_dev *dev) |
@@ -168,6 +174,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_ | |||
168 | } | 174 | } |
169 | 175 | ||
170 | acecad->usbdev = dev; | 176 | acecad->usbdev = dev; |
177 | acecad->intf = intf; | ||
171 | acecad->input = input_dev; | 178 | acecad->input = input_dev; |
172 | 179 | ||
173 | if (dev->manufacturer) | 180 | if (dev->manufacturer) |
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index 205d16aab44..755a39e4c9e 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c | |||
@@ -309,6 +309,7 @@ struct aiptek_settings { | |||
309 | struct aiptek { | 309 | struct aiptek { |
310 | struct input_dev *inputdev; /* input device struct */ | 310 | struct input_dev *inputdev; /* input device struct */ |
311 | struct usb_device *usbdev; /* usb device struct */ | 311 | struct usb_device *usbdev; /* usb device struct */ |
312 | struct usb_interface *intf; /* usb interface struct */ | ||
312 | struct urb *urb; /* urb for incoming reports */ | 313 | struct urb *urb; /* urb for incoming reports */ |
313 | dma_addr_t data_dma; /* our dma stuffage */ | 314 | dma_addr_t data_dma; /* our dma stuffage */ |
314 | struct aiptek_features features; /* tablet's array of features */ | 315 | struct aiptek_features features; /* tablet's array of features */ |
@@ -435,6 +436,7 @@ static void aiptek_irq(struct urb *urb) | |||
435 | struct aiptek *aiptek = urb->context; | 436 | struct aiptek *aiptek = urb->context; |
436 | unsigned char *data = aiptek->data; | 437 | unsigned char *data = aiptek->data; |
437 | struct input_dev *inputdev = aiptek->inputdev; | 438 | struct input_dev *inputdev = aiptek->inputdev; |
439 | struct usb_interface *intf = aiptek->intf; | ||
438 | int jitterable = 0; | 440 | int jitterable = 0; |
439 | int retval, macro, x, y, z, left, right, middle, p, dv, tip, bs, pck; | 441 | int retval, macro, x, y, z, left, right, middle, p, dv, tip, bs, pck; |
440 | 442 | ||
@@ -447,13 +449,13 @@ static void aiptek_irq(struct urb *urb) | |||
447 | case -ENOENT: | 449 | case -ENOENT: |
448 | case -ESHUTDOWN: | 450 | case -ESHUTDOWN: |
449 | /* This urb is terminated, clean up */ | 451 | /* This urb is terminated, clean up */ |
450 | dbg("%s - urb shutting down with status: %d", | 452 | dev_dbg(&intf->dev, "%s - urb shutting down with status: %d\n", |
451 | __func__, urb->status); | 453 | __func__, urb->status); |
452 | return; | 454 | return; |
453 | 455 | ||
454 | default: | 456 | default: |
455 | dbg("%s - nonzero urb status received: %d", | 457 | dev_dbg(&intf->dev, "%s - nonzero urb status received: %d\n", |
456 | __func__, urb->status); | 458 | __func__, urb->status); |
457 | goto exit; | 459 | goto exit; |
458 | } | 460 | } |
459 | 461 | ||
@@ -785,7 +787,7 @@ static void aiptek_irq(struct urb *urb) | |||
785 | 1 | AIPTEK_REPORT_TOOL_UNKNOWN); | 787 | 1 | AIPTEK_REPORT_TOOL_UNKNOWN); |
786 | input_sync(inputdev); | 788 | input_sync(inputdev); |
787 | } else { | 789 | } else { |
788 | dbg("Unknown report %d", data[0]); | 790 | dev_dbg(&intf->dev, "Unknown report %d\n", data[0]); |
789 | } | 791 | } |
790 | 792 | ||
791 | /* Jitter may occur when the user presses a button on the stlyus | 793 | /* Jitter may occur when the user presses a button on the stlyus |
@@ -811,8 +813,9 @@ static void aiptek_irq(struct urb *urb) | |||
811 | exit: | 813 | exit: |
812 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 814 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
813 | if (retval != 0) { | 815 | if (retval != 0) { |
814 | err("%s - usb_submit_urb failed with result %d", | 816 | dev_err(&intf->dev, |
815 | __func__, retval); | 817 | "%s - usb_submit_urb failed with result %d\n", |
818 | __func__, retval); | ||
816 | } | 819 | } |
817 | } | 820 | } |
818 | 821 | ||
@@ -912,8 +915,9 @@ aiptek_command(struct aiptek *aiptek, unsigned char command, unsigned char data) | |||
912 | 915 | ||
913 | if ((ret = | 916 | if ((ret = |
914 | aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { | 917 | aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { |
915 | dbg("aiptek_program: failed, tried to send: 0x%02x 0x%02x", | 918 | dev_dbg(&aiptek->intf->dev, |
916 | command, data); | 919 | "aiptek_program: failed, tried to send: 0x%02x 0x%02x\n", |
920 | command, data); | ||
917 | } | 921 | } |
918 | kfree(buf); | 922 | kfree(buf); |
919 | return ret < 0 ? ret : 0; | 923 | return ret < 0 ? ret : 0; |
@@ -947,8 +951,9 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data) | |||
947 | 951 | ||
948 | if ((ret = | 952 | if ((ret = |
949 | aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { | 953 | aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { |
950 | dbg("aiptek_query failed: returned 0x%02x 0x%02x 0x%02x", | 954 | dev_dbg(&aiptek->intf->dev, |
951 | buf[0], buf[1], buf[2]); | 955 | "aiptek_query failed: returned 0x%02x 0x%02x 0x%02x\n", |
956 | buf[0], buf[1], buf[2]); | ||
952 | ret = -EIO; | 957 | ret = -EIO; |
953 | } else { | 958 | } else { |
954 | ret = get_unaligned_le16(buf + 1); | 959 | ret = get_unaligned_le16(buf + 1); |
@@ -1726,6 +1731,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1726 | 1731 | ||
1727 | aiptek->inputdev = inputdev; | 1732 | aiptek->inputdev = inputdev; |
1728 | aiptek->usbdev = usbdev; | 1733 | aiptek->usbdev = usbdev; |
1734 | aiptek->intf = intf; | ||
1729 | aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber; | 1735 | aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber; |
1730 | aiptek->inDelay = 0; | 1736 | aiptek->inDelay = 0; |
1731 | aiptek->endDelay = 0; | 1737 | aiptek->endDelay = 0; |
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index 89a297801dc..29e01ab6859 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c | |||
@@ -2,8 +2,6 @@ | |||
2 | 2 | ||
3 | GTCO digitizer USB driver | 3 | GTCO digitizer USB driver |
4 | 4 | ||
5 | Use the err() and dbg() macros from usb.h for system logging | ||
6 | |||
7 | TO CHECK: Is pressure done right on report 5? | 5 | TO CHECK: Is pressure done right on report 5? |
8 | 6 | ||
9 | Copyright (C) 2006 GTCO CalComp | 7 | Copyright (C) 2006 GTCO CalComp |
@@ -108,6 +106,7 @@ struct gtco { | |||
108 | 106 | ||
109 | struct input_dev *inputdevice; /* input device struct pointer */ | 107 | struct input_dev *inputdevice; /* input device struct pointer */ |
110 | struct usb_device *usbdev; /* the usb device for this device */ | 108 | struct usb_device *usbdev; /* the usb device for this device */ |
109 | struct usb_interface *intf; /* the usb interface for this device */ | ||
111 | struct urb *urbinfo; /* urb for incoming reports */ | 110 | struct urb *urbinfo; /* urb for incoming reports */ |
112 | dma_addr_t buf_dma; /* dma addr of the data buffer*/ | 111 | dma_addr_t buf_dma; /* dma addr of the data buffer*/ |
113 | unsigned char * buffer; /* databuffer for reports */ | 112 | unsigned char * buffer; /* databuffer for reports */ |
@@ -202,6 +201,7 @@ struct hid_descriptor | |||
202 | static void parse_hid_report_descriptor(struct gtco *device, char * report, | 201 | static void parse_hid_report_descriptor(struct gtco *device, char * report, |
203 | int length) | 202 | int length) |
204 | { | 203 | { |
204 | struct device *ddev = &device->intf->dev; | ||
205 | int x, i = 0; | 205 | int x, i = 0; |
206 | 206 | ||
207 | /* Tag primitive vars */ | 207 | /* Tag primitive vars */ |
@@ -228,7 +228,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, | |||
228 | char indentstr[10] = ""; | 228 | char indentstr[10] = ""; |
229 | 229 | ||
230 | 230 | ||
231 | dbg("======>>>>>>PARSE<<<<<<======"); | 231 | dev_dbg(ddev, "======>>>>>>PARSE<<<<<<======\n"); |
232 | 232 | ||
233 | /* Walk this report and pull out the info we need */ | 233 | /* Walk this report and pull out the info we need */ |
234 | while (i < length) { | 234 | while (i < length) { |
@@ -277,11 +277,11 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, | |||
277 | else if (data == 3) | 277 | else if (data == 3) |
278 | strcpy(globtype, "Var|Const"); | 278 | strcpy(globtype, "Var|Const"); |
279 | 279 | ||
280 | dbg("::::: Saving Report: %d input #%d Max: 0x%X(%d) Min:0x%X(%d) of %d bits", | 280 | dev_dbg(ddev, "::::: Saving Report: %d input #%d Max: 0x%X(%d) Min:0x%X(%d) of %d bits\n", |
281 | globalval[TAG_GLOB_REPORT_ID], inputnum, | 281 | globalval[TAG_GLOB_REPORT_ID], inputnum, |
282 | globalval[TAG_GLOB_LOG_MAX], globalval[TAG_GLOB_LOG_MAX], | 282 | globalval[TAG_GLOB_LOG_MAX], globalval[TAG_GLOB_LOG_MAX], |
283 | globalval[TAG_GLOB_LOG_MIN], globalval[TAG_GLOB_LOG_MIN], | 283 | globalval[TAG_GLOB_LOG_MIN], globalval[TAG_GLOB_LOG_MIN], |
284 | globalval[TAG_GLOB_REPORT_SZ] * globalval[TAG_GLOB_REPORT_CNT]); | 284 | globalval[TAG_GLOB_REPORT_SZ] * globalval[TAG_GLOB_REPORT_CNT]); |
285 | 285 | ||
286 | 286 | ||
287 | /* | 287 | /* |
@@ -292,7 +292,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, | |||
292 | */ | 292 | */ |
293 | switch (inputnum) { | 293 | switch (inputnum) { |
294 | case 0: /* X coord */ | 294 | case 0: /* X coord */ |
295 | dbg("GER: X Usage: 0x%x", usage); | 295 | dev_dbg(ddev, "GER: X Usage: 0x%x\n", usage); |
296 | if (device->max_X == 0) { | 296 | if (device->max_X == 0) { |
297 | device->max_X = globalval[TAG_GLOB_LOG_MAX]; | 297 | device->max_X = globalval[TAG_GLOB_LOG_MAX]; |
298 | device->min_X = globalval[TAG_GLOB_LOG_MIN]; | 298 | device->min_X = globalval[TAG_GLOB_LOG_MIN]; |
@@ -300,7 +300,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, | |||
300 | break; | 300 | break; |
301 | 301 | ||
302 | case 1: /* Y coord */ | 302 | case 1: /* Y coord */ |
303 | dbg("GER: Y Usage: 0x%x", usage); | 303 | dev_dbg(ddev, "GER: Y Usage: 0x%x\n", usage); |
304 | if (device->max_Y == 0) { | 304 | if (device->max_Y == 0) { |
305 | device->max_Y = globalval[TAG_GLOB_LOG_MAX]; | 305 | device->max_Y = globalval[TAG_GLOB_LOG_MAX]; |
306 | device->min_Y = globalval[TAG_GLOB_LOG_MIN]; | 306 | device->min_Y = globalval[TAG_GLOB_LOG_MIN]; |
@@ -350,10 +350,10 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, | |||
350 | maintype = 'S'; | 350 | maintype = 'S'; |
351 | 351 | ||
352 | if (data == 0) { | 352 | if (data == 0) { |
353 | dbg("======>>>>>> Physical"); | 353 | dev_dbg(ddev, "======>>>>>> Physical\n"); |
354 | strcpy(globtype, "Physical"); | 354 | strcpy(globtype, "Physical"); |
355 | } else | 355 | } else |
356 | dbg("======>>>>>>"); | 356 | dev_dbg(ddev, "======>>>>>>\n"); |
357 | 357 | ||
358 | /* Indent the debug output */ | 358 | /* Indent the debug output */ |
359 | indent++; | 359 | indent++; |
@@ -368,7 +368,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, | |||
368 | break; | 368 | break; |
369 | 369 | ||
370 | case TAG_MAIN_COL_END: | 370 | case TAG_MAIN_COL_END: |
371 | dbg("<<<<<<======"); | 371 | dev_dbg(ddev, "<<<<<<======\n"); |
372 | maintype = 'E'; | 372 | maintype = 'E'; |
373 | indent--; | 373 | indent--; |
374 | for (x = 0; x < indent; x++) | 374 | for (x = 0; x < indent; x++) |
@@ -384,18 +384,18 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, | |||
384 | 384 | ||
385 | switch (size) { | 385 | switch (size) { |
386 | case 1: | 386 | case 1: |
387 | dbg("%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x", | 387 | dev_dbg(ddev, "%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x\n", |
388 | indentstr, tag, maintype, size, globtype, data); | 388 | indentstr, tag, maintype, size, globtype, data); |
389 | break; | 389 | break; |
390 | 390 | ||
391 | case 2: | 391 | case 2: |
392 | dbg("%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x", | 392 | dev_dbg(ddev, "%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x\n", |
393 | indentstr, tag, maintype, size, globtype, data16); | 393 | indentstr, tag, maintype, size, globtype, data16); |
394 | break; | 394 | break; |
395 | 395 | ||
396 | case 4: | 396 | case 4: |
397 | dbg("%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x", | 397 | dev_dbg(ddev, "%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x\n", |
398 | indentstr, tag, maintype, size, globtype, data32); | 398 | indentstr, tag, maintype, size, globtype, data32); |
399 | break; | 399 | break; |
400 | } | 400 | } |
401 | break; | 401 | break; |
@@ -465,26 +465,26 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, | |||
465 | if (tag < TAG_GLOB_MAX) { | 465 | if (tag < TAG_GLOB_MAX) { |
466 | switch (size) { | 466 | switch (size) { |
467 | case 1: | 467 | case 1: |
468 | dbg("%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x", | 468 | dev_dbg(ddev, "%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x\n", |
469 | indentstr, globtype, tag, size, data); | 469 | indentstr, globtype, tag, size, data); |
470 | globalval[tag] = data; | 470 | globalval[tag] = data; |
471 | break; | 471 | break; |
472 | 472 | ||
473 | case 2: | 473 | case 2: |
474 | dbg("%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x", | 474 | dev_dbg(ddev, "%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x\n", |
475 | indentstr, globtype, tag, size, data16); | 475 | indentstr, globtype, tag, size, data16); |
476 | globalval[tag] = data16; | 476 | globalval[tag] = data16; |
477 | break; | 477 | break; |
478 | 478 | ||
479 | case 4: | 479 | case 4: |
480 | dbg("%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x", | 480 | dev_dbg(ddev, "%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x\n", |
481 | indentstr, globtype, tag, size, data32); | 481 | indentstr, globtype, tag, size, data32); |
482 | globalval[tag] = data32; | 482 | globalval[tag] = data32; |
483 | break; | 483 | break; |
484 | } | 484 | } |
485 | } else { | 485 | } else { |
486 | dbg("%sGLOBALTAG: ILLEGAL TAG:%d SIZE: %d ", | 486 | dev_dbg(ddev, "%sGLOBALTAG: ILLEGAL TAG:%d SIZE: %d\n", |
487 | indentstr, tag, size); | 487 | indentstr, tag, size); |
488 | } | 488 | } |
489 | break; | 489 | break; |
490 | 490 | ||
@@ -511,18 +511,18 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, | |||
511 | 511 | ||
512 | switch (size) { | 512 | switch (size) { |
513 | case 1: | 513 | case 1: |
514 | dbg("%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x", | 514 | dev_dbg(ddev, "%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x\n", |
515 | indentstr, tag, globtype, size, data); | 515 | indentstr, tag, globtype, size, data); |
516 | break; | 516 | break; |
517 | 517 | ||
518 | case 2: | 518 | case 2: |
519 | dbg("%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x", | 519 | dev_dbg(ddev, "%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x\n", |
520 | indentstr, tag, globtype, size, data16); | 520 | indentstr, tag, globtype, size, data16); |
521 | break; | 521 | break; |
522 | 522 | ||
523 | case 4: | 523 | case 4: |
524 | dbg("%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x", | 524 | dev_dbg(ddev, "%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x\n", |
525 | indentstr, tag, globtype, size, data32); | 525 | indentstr, tag, globtype, size, data32); |
526 | break; | 526 | break; |
527 | } | 527 | } |
528 | 528 | ||
@@ -714,8 +714,9 @@ static void gtco_urb_callback(struct urb *urbinfo) | |||
714 | * the rest as 0 | 714 | * the rest as 0 |
715 | */ | 715 | */ |
716 | val = device->buffer[5] & MASK_BUTTON; | 716 | val = device->buffer[5] & MASK_BUTTON; |
717 | dbg("======>>>>>>REPORT 1: val 0x%X(%d)", | 717 | dev_dbg(&device->intf->dev, |
718 | val, val); | 718 | "======>>>>>>REPORT 1: val 0x%X(%d)\n", |
719 | val, val); | ||
719 | 720 | ||
720 | /* | 721 | /* |
721 | * We don't apply any meaning to the button | 722 | * We don't apply any meaning to the button |
@@ -808,7 +809,8 @@ static void gtco_urb_callback(struct urb *urbinfo) | |||
808 | resubmit: | 809 | resubmit: |
809 | rc = usb_submit_urb(urbinfo, GFP_ATOMIC); | 810 | rc = usb_submit_urb(urbinfo, GFP_ATOMIC); |
810 | if (rc != 0) | 811 | if (rc != 0) |
811 | err("usb_submit_urb failed rc=0x%x", rc); | 812 | dev_err(&device->intf->dev, |
813 | "usb_submit_urb failed rc=0x%x\n", rc); | ||
812 | } | 814 | } |
813 | 815 | ||
814 | /* | 816 | /* |
@@ -838,7 +840,7 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
838 | gtco = kzalloc(sizeof(struct gtco), GFP_KERNEL); | 840 | gtco = kzalloc(sizeof(struct gtco), GFP_KERNEL); |
839 | input_dev = input_allocate_device(); | 841 | input_dev = input_allocate_device(); |
840 | if (!gtco || !input_dev) { | 842 | if (!gtco || !input_dev) { |
841 | err("No more memory"); | 843 | dev_err(&usbinterface->dev, "No more memory\n"); |
842 | error = -ENOMEM; | 844 | error = -ENOMEM; |
843 | goto err_free_devs; | 845 | goto err_free_devs; |
844 | } | 846 | } |
@@ -848,12 +850,13 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
848 | 850 | ||
849 | /* Save interface information */ | 851 | /* Save interface information */ |
850 | gtco->usbdev = usb_get_dev(interface_to_usbdev(usbinterface)); | 852 | gtco->usbdev = usb_get_dev(interface_to_usbdev(usbinterface)); |
853 | gtco->intf = usbinterface; | ||
851 | 854 | ||
852 | /* Allocate some data for incoming reports */ | 855 | /* Allocate some data for incoming reports */ |
853 | gtco->buffer = usb_alloc_coherent(gtco->usbdev, REPORT_MAX_SIZE, | 856 | gtco->buffer = usb_alloc_coherent(gtco->usbdev, REPORT_MAX_SIZE, |
854 | GFP_KERNEL, >co->buf_dma); | 857 | GFP_KERNEL, >co->buf_dma); |
855 | if (!gtco->buffer) { | 858 | if (!gtco->buffer) { |
856 | err("No more memory for us buffers"); | 859 | dev_err(&usbinterface->dev, "No more memory for us buffers\n"); |
857 | error = -ENOMEM; | 860 | error = -ENOMEM; |
858 | goto err_free_devs; | 861 | goto err_free_devs; |
859 | } | 862 | } |
@@ -861,7 +864,7 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
861 | /* Allocate URB for reports */ | 864 | /* Allocate URB for reports */ |
862 | gtco->urbinfo = usb_alloc_urb(0, GFP_KERNEL); | 865 | gtco->urbinfo = usb_alloc_urb(0, GFP_KERNEL); |
863 | if (!gtco->urbinfo) { | 866 | if (!gtco->urbinfo) { |
864 | err("Failed to allocate URB"); | 867 | dev_err(&usbinterface->dev, "Failed to allocate URB\n"); |
865 | error = -ENOMEM; | 868 | error = -ENOMEM; |
866 | goto err_free_buf; | 869 | goto err_free_buf; |
867 | } | 870 | } |
@@ -873,14 +876,14 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
873 | endpoint = &usbinterface->altsetting[0].endpoint[0].desc; | 876 | endpoint = &usbinterface->altsetting[0].endpoint[0].desc; |
874 | 877 | ||
875 | /* Some debug */ | 878 | /* Some debug */ |
876 | dbg("gtco # interfaces: %d", usbinterface->num_altsetting); | 879 | dev_dbg(&usbinterface->dev, "gtco # interfaces: %d\n", usbinterface->num_altsetting); |
877 | dbg("num endpoints: %d", usbinterface->cur_altsetting->desc.bNumEndpoints); | 880 | dev_dbg(&usbinterface->dev, "num endpoints: %d\n", usbinterface->cur_altsetting->desc.bNumEndpoints); |
878 | dbg("interface class: %d", usbinterface->cur_altsetting->desc.bInterfaceClass); | 881 | dev_dbg(&usbinterface->dev, "interface class: %d\n", usbinterface->cur_altsetting->desc.bInterfaceClass); |
879 | dbg("endpoint: attribute:0x%x type:0x%x", endpoint->bmAttributes, endpoint->bDescriptorType); | 882 | dev_dbg(&usbinterface->dev, "endpoint: attribute:0x%x type:0x%x\n", endpoint->bmAttributes, endpoint->bDescriptorType); |
880 | if (usb_endpoint_xfer_int(endpoint)) | 883 | if (usb_endpoint_xfer_int(endpoint)) |
881 | dbg("endpoint: we have interrupt endpoint\n"); | 884 | dev_dbg(&usbinterface->dev, "endpoint: we have interrupt endpoint\n"); |
882 | 885 | ||
883 | dbg("endpoint extra len:%d ", usbinterface->altsetting[0].extralen); | 886 | dev_dbg(&usbinterface->dev, "endpoint extra len:%d\n", usbinterface->altsetting[0].extralen); |
884 | 887 | ||
885 | /* | 888 | /* |
886 | * Find the HID descriptor so we can find out the size of the | 889 | * Find the HID descriptor so we can find out the size of the |
@@ -888,17 +891,19 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
888 | */ | 891 | */ |
889 | if (usb_get_extra_descriptor(usbinterface->cur_altsetting, | 892 | if (usb_get_extra_descriptor(usbinterface->cur_altsetting, |
890 | HID_DEVICE_TYPE, &hid_desc) != 0){ | 893 | HID_DEVICE_TYPE, &hid_desc) != 0){ |
891 | err("Can't retrieve exta USB descriptor to get hid report descriptor length"); | 894 | dev_err(&usbinterface->dev, |
895 | "Can't retrieve exta USB descriptor to get hid report descriptor length\n"); | ||
892 | error = -EIO; | 896 | error = -EIO; |
893 | goto err_free_urb; | 897 | goto err_free_urb; |
894 | } | 898 | } |
895 | 899 | ||
896 | dbg("Extra descriptor success: type:%d len:%d", | 900 | dev_dbg(&usbinterface->dev, |
897 | hid_desc->bDescriptorType, hid_desc->wDescriptorLength); | 901 | "Extra descriptor success: type:%d len:%d\n", |
902 | hid_desc->bDescriptorType, hid_desc->wDescriptorLength); | ||
898 | 903 | ||
899 | report = kzalloc(le16_to_cpu(hid_desc->wDescriptorLength), GFP_KERNEL); | 904 | report = kzalloc(le16_to_cpu(hid_desc->wDescriptorLength), GFP_KERNEL); |
900 | if (!report) { | 905 | if (!report) { |
901 | err("No more memory for report"); | 906 | dev_err(&usbinterface->dev, "No more memory for report\n"); |
902 | error = -ENOMEM; | 907 | error = -ENOMEM; |
903 | goto err_free_urb; | 908 | goto err_free_urb; |
904 | } | 909 | } |
@@ -915,7 +920,7 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
915 | le16_to_cpu(hid_desc->wDescriptorLength), | 920 | le16_to_cpu(hid_desc->wDescriptorLength), |
916 | 5000); /* 5 secs */ | 921 | 5000); /* 5 secs */ |
917 | 922 | ||
918 | dbg("usb_control_msg result: %d", result); | 923 | dev_dbg(&usbinterface->dev, "usb_control_msg result: %d\n", result); |
919 | if (result == le16_to_cpu(hid_desc->wDescriptorLength)) { | 924 | if (result == le16_to_cpu(hid_desc->wDescriptorLength)) { |
920 | parse_hid_report_descriptor(gtco, report, result); | 925 | parse_hid_report_descriptor(gtco, report, result); |
921 | break; | 926 | break; |
@@ -926,8 +931,9 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
926 | 931 | ||
927 | /* If we didn't get the report, fail */ | 932 | /* If we didn't get the report, fail */ |
928 | if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { | 933 | if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { |
929 | err("Failed to get HID Report Descriptor of size: %d", | 934 | dev_err(&usbinterface->dev, |
930 | hid_desc->wDescriptorLength); | 935 | "Failed to get HID Report Descriptor of size: %d\n", |
936 | hid_desc->wDescriptorLength); | ||
931 | error = -EIO; | 937 | error = -EIO; |
932 | goto err_free_urb; | 938 | goto err_free_urb; |
933 | } | 939 | } |
diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index 85a5b40333a..3fba74b9b60 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c | |||
@@ -33,6 +33,7 @@ struct kbtab { | |||
33 | dma_addr_t data_dma; | 33 | dma_addr_t data_dma; |
34 | struct input_dev *dev; | 34 | struct input_dev *dev; |
35 | struct usb_device *usbdev; | 35 | struct usb_device *usbdev; |
36 | struct usb_interface *intf; | ||
36 | struct urb *irq; | 37 | struct urb *irq; |
37 | char phys[32]; | 38 | char phys[32]; |
38 | }; | 39 | }; |
@@ -53,10 +54,14 @@ static void kbtab_irq(struct urb *urb) | |||
53 | case -ENOENT: | 54 | case -ENOENT: |
54 | case -ESHUTDOWN: | 55 | case -ESHUTDOWN: |
55 | /* this urb is terminated, clean up */ | 56 | /* this urb is terminated, clean up */ |
56 | dbg("%s - urb shutting down with status: %d", __func__, urb->status); | 57 | dev_dbg(&kbtab->intf->dev, |
58 | "%s - urb shutting down with status: %d\n", | ||
59 | __func__, urb->status); | ||
57 | return; | 60 | return; |
58 | default: | 61 | default: |
59 | dbg("%s - nonzero urb status received: %d", __func__, urb->status); | 62 | dev_dbg(&kbtab->intf->dev, |
63 | "%s - nonzero urb status received: %d\n", | ||
64 | __func__, urb->status); | ||
60 | goto exit; | 65 | goto exit; |
61 | } | 66 | } |
62 | 67 | ||
@@ -80,8 +85,9 @@ static void kbtab_irq(struct urb *urb) | |||
80 | exit: | 85 | exit: |
81 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 86 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
82 | if (retval) | 87 | if (retval) |
83 | err("%s - usb_submit_urb failed with result %d", | 88 | dev_err(&kbtab->intf->dev, |
84 | __func__, retval); | 89 | "%s - usb_submit_urb failed with result %d\n", |
90 | __func__, retval); | ||
85 | } | 91 | } |
86 | 92 | ||
87 | static struct usb_device_id kbtab_ids[] = { | 93 | static struct usb_device_id kbtab_ids[] = { |
@@ -131,6 +137,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
131 | goto fail2; | 137 | goto fail2; |
132 | 138 | ||
133 | kbtab->usbdev = dev; | 139 | kbtab->usbdev = dev; |
140 | kbtab->intf = intf; | ||
134 | kbtab->dev = input_dev; | 141 | kbtab->dev = input_dev; |
135 | 142 | ||
136 | usb_make_path(dev, kbtab->phys, sizeof(kbtab->phys)); | 143 | usb_make_path(dev, kbtab->phys, sizeof(kbtab->phys)); |
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 0d269212931..79a0509882d 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -99,6 +99,7 @@ static int wacom_set_report(struct usb_interface *intf, u8 type, u8 id, | |||
99 | static void wacom_sys_irq(struct urb *urb) | 99 | static void wacom_sys_irq(struct urb *urb) |
100 | { | 100 | { |
101 | struct wacom *wacom = urb->context; | 101 | struct wacom *wacom = urb->context; |
102 | struct device *dev = &wacom->intf->dev; | ||
102 | int retval; | 103 | int retval; |
103 | 104 | ||
104 | switch (urb->status) { | 105 | switch (urb->status) { |
@@ -109,10 +110,12 @@ static void wacom_sys_irq(struct urb *urb) | |||
109 | case -ENOENT: | 110 | case -ENOENT: |
110 | case -ESHUTDOWN: | 111 | case -ESHUTDOWN: |
111 | /* this urb is terminated, clean up */ | 112 | /* this urb is terminated, clean up */ |
112 | dbg("%s - urb shutting down with status: %d", __func__, urb->status); | 113 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
114 | __func__, urb->status); | ||
113 | return; | 115 | return; |
114 | default: | 116 | default: |
115 | dbg("%s - nonzero urb status received: %d", __func__, urb->status); | 117 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
118 | __func__, urb->status); | ||
116 | goto exit; | 119 | goto exit; |
117 | } | 120 | } |
118 | 121 | ||
@@ -122,8 +125,8 @@ static void wacom_sys_irq(struct urb *urb) | |||
122 | usb_mark_last_busy(wacom->usbdev); | 125 | usb_mark_last_busy(wacom->usbdev); |
123 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 126 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
124 | if (retval) | 127 | if (retval) |
125 | err ("%s - usb_submit_urb failed with result %d", | 128 | dev_err(dev, "%s - usb_submit_urb failed with result %d\n", |
126 | __func__, retval); | 129 | __func__, retval); |
127 | } | 130 | } |
128 | 131 | ||
129 | static int wacom_open(struct input_dev *dev) | 132 | static int wacom_open(struct input_dev *dev) |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index cecd35c8f0b..b327790e9a0 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -76,7 +76,8 @@ static int wacom_pl_irq(struct wacom_wac *wacom) | |||
76 | int prox, pressure; | 76 | int prox, pressure; |
77 | 77 | ||
78 | if (data[0] != WACOM_REPORT_PENABLED) { | 78 | if (data[0] != WACOM_REPORT_PENABLED) { |
79 | dbg("wacom_pl_irq: received unknown report #%d", data[0]); | 79 | dev_dbg(&input->dev, |
80 | "wacom_pl_irq: received unknown report #%d\n", data[0]); | ||
80 | return 0; | 81 | return 0; |
81 | } | 82 | } |
82 | 83 | ||
@@ -175,7 +176,7 @@ static int wacom_dtu_irq(struct wacom_wac *wacom) | |||
175 | struct input_dev *input = wacom->input; | 176 | struct input_dev *input = wacom->input; |
176 | int prox = data[1] & 0x20, pressure; | 177 | int prox = data[1] & 0x20, pressure; |
177 | 178 | ||
178 | dbg("wacom_dtu_irq: received report #%d", data[0]); | 179 | dev_dbg(&input->dev, "wacom_dtu_irq: received report #%d\n", data[0]); |
179 | 180 | ||
180 | if (prox) { | 181 | if (prox) { |
181 | /* Going into proximity select tool */ | 182 | /* Going into proximity select tool */ |
@@ -211,7 +212,9 @@ static int wacom_graphire_irq(struct wacom_wac *wacom) | |||
211 | int retval = 0; | 212 | int retval = 0; |
212 | 213 | ||
213 | if (data[0] != WACOM_REPORT_PENABLED) { | 214 | if (data[0] != WACOM_REPORT_PENABLED) { |
214 | dbg("wacom_graphire_irq: received unknown report #%d", data[0]); | 215 | dev_dbg(&input->dev, |
216 | "wacom_graphire_irq: received unknown report #%d\n", | ||
217 | data[0]); | ||
215 | goto exit; | 218 | goto exit; |
216 | } | 219 | } |
217 | 220 | ||
@@ -484,7 +487,9 @@ static int wacom_intuos_irq(struct wacom_wac *wacom) | |||
484 | 487 | ||
485 | if (data[0] != WACOM_REPORT_PENABLED && data[0] != WACOM_REPORT_INTUOSREAD | 488 | if (data[0] != WACOM_REPORT_PENABLED && data[0] != WACOM_REPORT_INTUOSREAD |
486 | && data[0] != WACOM_REPORT_INTUOSWRITE && data[0] != WACOM_REPORT_INTUOSPAD) { | 489 | && data[0] != WACOM_REPORT_INTUOSWRITE && data[0] != WACOM_REPORT_INTUOSPAD) { |
487 | dbg("wacom_intuos_irq: received unknown report #%d", data[0]); | 490 | dev_dbg(&input->dev, |
491 | "wacom_intuos_irq: received unknown report #%d\n", | ||
492 | data[0]); | ||
488 | return 0; | 493 | return 0; |
489 | } | 494 | } |
490 | 495 | ||
@@ -830,7 +835,8 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len) | |||
830 | { | 835 | { |
831 | char *data = wacom->data; | 836 | char *data = wacom->data; |
832 | 837 | ||
833 | dbg("wacom_tpc_irq: received report #%d", data[0]); | 838 | dev_dbg(&wacom->input->dev, "wacom_tpc_irq: received report #%d\n", |
839 | data[0]); | ||
834 | 840 | ||
835 | switch (len) { | 841 | switch (len) { |
836 | case WACOM_PKGLEN_TPC1FG: | 842 | case WACOM_PKGLEN_TPC1FG: |
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 22cd96f58c9..e32709e0dd6 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c | |||
@@ -269,8 +269,9 @@ static int e2i_init(struct usbtouch_usb *usbtouch) | |||
269 | 0x01, 0x02, 0x0000, 0x0081, | 269 | 0x01, 0x02, 0x0000, 0x0081, |
270 | NULL, 0, USB_CTRL_SET_TIMEOUT); | 270 | NULL, 0, USB_CTRL_SET_TIMEOUT); |
271 | 271 | ||
272 | dbg("%s - usb_control_msg - E2I_RESET - bytes|err: %d", | 272 | dev_dbg(&usbtouch->interface->dev, |
273 | __func__, ret); | 273 | "%s - usb_control_msg - E2I_RESET - bytes|err: %d\n", |
274 | __func__, ret); | ||
274 | return ret; | 275 | return ret; |
275 | } | 276 | } |
276 | 277 | ||
@@ -425,8 +426,9 @@ static int mtouch_init(struct usbtouch_usb *usbtouch) | |||
425 | MTOUCHUSB_RESET, | 426 | MTOUCHUSB_RESET, |
426 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 427 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
427 | 1, 0, NULL, 0, USB_CTRL_SET_TIMEOUT); | 428 | 1, 0, NULL, 0, USB_CTRL_SET_TIMEOUT); |
428 | dbg("%s - usb_control_msg - MTOUCHUSB_RESET - bytes|err: %d", | 429 | dev_dbg(&usbtouch->interface->dev, |
429 | __func__, ret); | 430 | "%s - usb_control_msg - MTOUCHUSB_RESET - bytes|err: %d\n", |
431 | __func__, ret); | ||
430 | if (ret < 0) | 432 | if (ret < 0) |
431 | return ret; | 433 | return ret; |
432 | msleep(150); | 434 | msleep(150); |
@@ -436,8 +438,9 @@ static int mtouch_init(struct usbtouch_usb *usbtouch) | |||
436 | MTOUCHUSB_ASYNC_REPORT, | 438 | MTOUCHUSB_ASYNC_REPORT, |
437 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 439 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
438 | 1, 1, NULL, 0, USB_CTRL_SET_TIMEOUT); | 440 | 1, 1, NULL, 0, USB_CTRL_SET_TIMEOUT); |
439 | dbg("%s - usb_control_msg - MTOUCHUSB_ASYNC_REPORT - bytes|err: %d", | 441 | dev_dbg(&usbtouch->interface->dev, |
440 | __func__, ret); | 442 | "%s - usb_control_msg - MTOUCHUSB_ASYNC_REPORT - bytes|err: %d\n", |
443 | __func__, ret); | ||
441 | if (ret >= 0) | 444 | if (ret >= 0) |
442 | break; | 445 | break; |
443 | if (ret != -EPIPE) | 446 | if (ret != -EPIPE) |
@@ -737,27 +740,29 @@ static int jastec_read_data(struct usbtouch_usb *dev, unsigned char *pkt) | |||
737 | #ifdef CONFIG_TOUCHSCREEN_USB_ZYTRONIC | 740 | #ifdef CONFIG_TOUCHSCREEN_USB_ZYTRONIC |
738 | static int zytronic_read_data(struct usbtouch_usb *dev, unsigned char *pkt) | 741 | static int zytronic_read_data(struct usbtouch_usb *dev, unsigned char *pkt) |
739 | { | 742 | { |
743 | struct usb_interface *intf = dev->interface; | ||
744 | |||
740 | switch (pkt[0]) { | 745 | switch (pkt[0]) { |
741 | case 0x3A: /* command response */ | 746 | case 0x3A: /* command response */ |
742 | dbg("%s: Command response %d", __func__, pkt[1]); | 747 | dev_dbg(&intf->dev, "%s: Command response %d\n", __func__, pkt[1]); |
743 | break; | 748 | break; |
744 | 749 | ||
745 | case 0xC0: /* down */ | 750 | case 0xC0: /* down */ |
746 | dev->x = (pkt[1] & 0x7f) | ((pkt[2] & 0x07) << 7); | 751 | dev->x = (pkt[1] & 0x7f) | ((pkt[2] & 0x07) << 7); |
747 | dev->y = (pkt[3] & 0x7f) | ((pkt[4] & 0x07) << 7); | 752 | dev->y = (pkt[3] & 0x7f) | ((pkt[4] & 0x07) << 7); |
748 | dev->touch = 1; | 753 | dev->touch = 1; |
749 | dbg("%s: down %d,%d", __func__, dev->x, dev->y); | 754 | dev_dbg(&intf->dev, "%s: down %d,%d\n", __func__, dev->x, dev->y); |
750 | return 1; | 755 | return 1; |
751 | 756 | ||
752 | case 0x80: /* up */ | 757 | case 0x80: /* up */ |
753 | dev->x = (pkt[1] & 0x7f) | ((pkt[2] & 0x07) << 7); | 758 | dev->x = (pkt[1] & 0x7f) | ((pkt[2] & 0x07) << 7); |
754 | dev->y = (pkt[3] & 0x7f) | ((pkt[4] & 0x07) << 7); | 759 | dev->y = (pkt[3] & 0x7f) | ((pkt[4] & 0x07) << 7); |
755 | dev->touch = 0; | 760 | dev->touch = 0; |
756 | dbg("%s: up %d,%d", __func__, dev->x, dev->y); | 761 | dev_dbg(&intf->dev, "%s: up %d,%d\n", __func__, dev->x, dev->y); |
757 | return 1; | 762 | return 1; |
758 | 763 | ||
759 | default: | 764 | default: |
760 | dbg("%s: Unknown return %d", __func__, pkt[0]); | 765 | dev_dbg(&intf->dev, "%s: Unknown return %d\n", __func__, pkt[0]); |
761 | break; | 766 | break; |
762 | } | 767 | } |
763 | 768 | ||
@@ -812,7 +817,8 @@ static int nexio_alloc(struct usbtouch_usb *usbtouch) | |||
812 | 817 | ||
813 | priv->ack = usb_alloc_urb(0, GFP_KERNEL); | 818 | priv->ack = usb_alloc_urb(0, GFP_KERNEL); |
814 | if (!priv->ack) { | 819 | if (!priv->ack) { |
815 | dbg("%s - usb_alloc_urb failed: usbtouch->ack", __func__); | 820 | dev_dbg(&usbtouch->interface->dev, |
821 | "%s - usb_alloc_urb failed: usbtouch->ack\n", __func__); | ||
816 | goto err_ack_buf; | 822 | goto err_ack_buf; |
817 | } | 823 | } |
818 | 824 | ||
@@ -1349,6 +1355,7 @@ out_flush_buf: | |||
1349 | static void usbtouch_irq(struct urb *urb) | 1355 | static void usbtouch_irq(struct urb *urb) |
1350 | { | 1356 | { |
1351 | struct usbtouch_usb *usbtouch = urb->context; | 1357 | struct usbtouch_usb *usbtouch = urb->context; |
1358 | struct device *dev = &usbtouch->interface->dev; | ||
1352 | int retval; | 1359 | int retval; |
1353 | 1360 | ||
1354 | switch (urb->status) { | 1361 | switch (urb->status) { |
@@ -1357,20 +1364,21 @@ static void usbtouch_irq(struct urb *urb) | |||
1357 | break; | 1364 | break; |
1358 | case -ETIME: | 1365 | case -ETIME: |
1359 | /* this urb is timing out */ | 1366 | /* this urb is timing out */ |
1360 | dbg("%s - urb timed out - was the device unplugged?", | 1367 | dev_dbg(dev, |
1361 | __func__); | 1368 | "%s - urb timed out - was the device unplugged?\n", |
1369 | __func__); | ||
1362 | return; | 1370 | return; |
1363 | case -ECONNRESET: | 1371 | case -ECONNRESET: |
1364 | case -ENOENT: | 1372 | case -ENOENT: |
1365 | case -ESHUTDOWN: | 1373 | case -ESHUTDOWN: |
1366 | case -EPIPE: | 1374 | case -EPIPE: |
1367 | /* this urb is terminated, clean up */ | 1375 | /* this urb is terminated, clean up */ |
1368 | dbg("%s - urb shutting down with status: %d", | 1376 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
1369 | __func__, urb->status); | 1377 | __func__, urb->status); |
1370 | return; | 1378 | return; |
1371 | default: | 1379 | default: |
1372 | dbg("%s - nonzero urb status received: %d", | 1380 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
1373 | __func__, urb->status); | 1381 | __func__, urb->status); |
1374 | goto exit; | 1382 | goto exit; |
1375 | } | 1383 | } |
1376 | 1384 | ||
@@ -1380,8 +1388,8 @@ exit: | |||
1380 | usb_mark_last_busy(interface_to_usbdev(usbtouch->interface)); | 1388 | usb_mark_last_busy(interface_to_usbdev(usbtouch->interface)); |
1381 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 1389 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
1382 | if (retval) | 1390 | if (retval) |
1383 | err("%s - usb_submit_urb failed with result: %d", | 1391 | dev_err(dev, "%s - usb_submit_urb failed with result: %d\n", |
1384 | __func__, retval); | 1392 | __func__, retval); |
1385 | } | 1393 | } |
1386 | 1394 | ||
1387 | static int usbtouch_open(struct input_dev *input) | 1395 | static int usbtouch_open(struct input_dev *input) |
@@ -1456,8 +1464,9 @@ static int usbtouch_reset_resume(struct usb_interface *intf) | |||
1456 | if (usbtouch->type->init) { | 1464 | if (usbtouch->type->init) { |
1457 | err = usbtouch->type->init(usbtouch); | 1465 | err = usbtouch->type->init(usbtouch); |
1458 | if (err) { | 1466 | if (err) { |
1459 | dbg("%s - type->init() failed, err: %d", | 1467 | dev_dbg(&intf->dev, |
1460 | __func__, err); | 1468 | "%s - type->init() failed, err: %d\n", |
1469 | __func__, err); | ||
1461 | return err; | 1470 | return err; |
1462 | } | 1471 | } |
1463 | } | 1472 | } |
@@ -1532,7 +1541,8 @@ static int usbtouch_probe(struct usb_interface *intf, | |||
1532 | 1541 | ||
1533 | usbtouch->irq = usb_alloc_urb(0, GFP_KERNEL); | 1542 | usbtouch->irq = usb_alloc_urb(0, GFP_KERNEL); |
1534 | if (!usbtouch->irq) { | 1543 | if (!usbtouch->irq) { |
1535 | dbg("%s - usb_alloc_urb failed: usbtouch->irq", __func__); | 1544 | dev_dbg(&intf->dev, |
1545 | "%s - usb_alloc_urb failed: usbtouch->irq\n", __func__); | ||
1536 | goto out_free_buffers; | 1546 | goto out_free_buffers; |
1537 | } | 1547 | } |
1538 | 1548 | ||
@@ -1594,7 +1604,9 @@ static int usbtouch_probe(struct usb_interface *intf, | |||
1594 | if (type->alloc) { | 1604 | if (type->alloc) { |
1595 | err = type->alloc(usbtouch); | 1605 | err = type->alloc(usbtouch); |
1596 | if (err) { | 1606 | if (err) { |
1597 | dbg("%s - type->alloc() failed, err: %d", __func__, err); | 1607 | dev_dbg(&intf->dev, |
1608 | "%s - type->alloc() failed, err: %d\n", | ||
1609 | __func__, err); | ||
1598 | goto out_free_urb; | 1610 | goto out_free_urb; |
1599 | } | 1611 | } |
1600 | } | 1612 | } |
@@ -1603,14 +1615,18 @@ static int usbtouch_probe(struct usb_interface *intf, | |||
1603 | if (type->init) { | 1615 | if (type->init) { |
1604 | err = type->init(usbtouch); | 1616 | err = type->init(usbtouch); |
1605 | if (err) { | 1617 | if (err) { |
1606 | dbg("%s - type->init() failed, err: %d", __func__, err); | 1618 | dev_dbg(&intf->dev, |
1619 | "%s - type->init() failed, err: %d\n", | ||
1620 | __func__, err); | ||
1607 | goto out_do_exit; | 1621 | goto out_do_exit; |
1608 | } | 1622 | } |
1609 | } | 1623 | } |
1610 | 1624 | ||
1611 | err = input_register_device(usbtouch->input); | 1625 | err = input_register_device(usbtouch->input); |
1612 | if (err) { | 1626 | if (err) { |
1613 | dbg("%s - input_register_device failed, err: %d", __func__, err); | 1627 | dev_dbg(&intf->dev, |
1628 | "%s - input_register_device failed, err: %d\n", | ||
1629 | __func__, err); | ||
1614 | goto out_do_exit; | 1630 | goto out_do_exit; |
1615 | } | 1631 | } |
1616 | 1632 | ||
@@ -1622,8 +1638,9 @@ static int usbtouch_probe(struct usb_interface *intf, | |||
1622 | err = usb_submit_urb(usbtouch->irq, GFP_KERNEL); | 1638 | err = usb_submit_urb(usbtouch->irq, GFP_KERNEL); |
1623 | if (err) { | 1639 | if (err) { |
1624 | usb_autopm_put_interface(intf); | 1640 | usb_autopm_put_interface(intf); |
1625 | err("%s - usb_submit_urb failed with result: %d", | 1641 | dev_err(&intf->dev, |
1626 | __func__, err); | 1642 | "%s - usb_submit_urb failed with result: %d\n", |
1643 | __func__, err); | ||
1627 | goto out_unregister_input; | 1644 | goto out_unregister_input; |
1628 | } | 1645 | } |
1629 | } | 1646 | } |
@@ -1650,12 +1667,12 @@ static void usbtouch_disconnect(struct usb_interface *intf) | |||
1650 | { | 1667 | { |
1651 | struct usbtouch_usb *usbtouch = usb_get_intfdata(intf); | 1668 | struct usbtouch_usb *usbtouch = usb_get_intfdata(intf); |
1652 | 1669 | ||
1653 | dbg("%s - called", __func__); | ||
1654 | |||
1655 | if (!usbtouch) | 1670 | if (!usbtouch) |
1656 | return; | 1671 | return; |
1657 | 1672 | ||
1658 | dbg("%s - usbtouch is initialized, cleaning up", __func__); | 1673 | dev_dbg(&intf->dev, |
1674 | "%s - usbtouch is initialized, cleaning up\n", __func__); | ||
1675 | |||
1659 | usb_set_intfdata(intf, NULL); | 1676 | usb_set_intfdata(intf, NULL); |
1660 | /* this will stop IO via close */ | 1677 | /* this will stop IO via close */ |
1661 | input_unregister_device(usbtouch->input); | 1678 | input_unregister_device(usbtouch->input); |