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/tablet | |
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/tablet')
-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 |
6 files changed, 115 insertions, 80 deletions
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: |