aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid/hid-quirks.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2007-05-30 09:07:13 -0400
committerJiri Kosina <jkosina@suse.cz>2007-07-09 08:03:35 -0400
commit58037eb961f859607b161c50d9d4ecb374de1e8f (patch)
treec192854fa4cfc16cce272b800a0393e21429191e /drivers/hid/usbhid/hid-quirks.c
parent7dcca30a32aadb0520417521b0c44f42d09fe05c (diff)
HID: make debugging output runtime-configurable
There have been many reports recently about broken HID devices, the diagnosis of which required users to recompile their kernels in order to be able to provide debugging output needed for coding a quirk for a particular device. This patch makes CONFIG_HID_DEBUG default y if !EMBEDDED and makes it possible to control debugging output produced by HID code by supplying 'debug=1' module parameter. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid/hid-quirks.c')
-rw-r--r--drivers/hid/usbhid/hid-quirks.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index f6c4145dc202..a418ebfe39b8 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -493,7 +493,7 @@ static struct hid_blacklist *usbhid_exists_dquirk(const u16 idVendor,
493 } 493 }
494 494
495 if (bl_entry != NULL) 495 if (bl_entry != NULL)
496 dbg("Found dynamic quirk 0x%x for USB HID vendor 0x%hx prod 0x%hx\n", 496 dbg_hid("Found dynamic quirk 0x%x for USB HID vendor 0x%hx prod 0x%hx\n",
497 bl_entry->quirks, bl_entry->idVendor, 497 bl_entry->quirks, bl_entry->idVendor,
498 bl_entry->idProduct); 498 bl_entry->idProduct);
499 499
@@ -521,13 +521,13 @@ int usbhid_modify_dquirk(const u16 idVendor, const u16 idProduct,
521 int list_edited = 0; 521 int list_edited = 0;
522 522
523 if (!idVendor) { 523 if (!idVendor) {
524 dbg("Cannot add a quirk with idVendor = 0"); 524 dbg_hid("Cannot add a quirk with idVendor = 0\n");
525 return -EINVAL; 525 return -EINVAL;
526 } 526 }
527 527
528 q_new = kmalloc(sizeof(struct quirks_list_struct), GFP_KERNEL); 528 q_new = kmalloc(sizeof(struct quirks_list_struct), GFP_KERNEL);
529 if (!q_new) { 529 if (!q_new) {
530 dbg("Could not allocate quirks_list_struct"); 530 dbg_hid("Could not allocate quirks_list_struct\n");
531 return -ENOMEM; 531 return -ENOMEM;
532 } 532 }
533 533
@@ -643,7 +643,7 @@ static const struct hid_blacklist *usbhid_exists_squirk(const u16 idVendor,
643 bl_entry = &hid_blacklist[n]; 643 bl_entry = &hid_blacklist[n];
644 644
645 if (bl_entry != NULL) 645 if (bl_entry != NULL)
646 dbg("Found squirk 0x%x for USB HID vendor 0x%hx prod 0x%hx\n", 646 dbg_hid("Found squirk 0x%x for USB HID vendor 0x%hx prod 0x%hx\n",
647 bl_entry->quirks, bl_entry->idVendor, 647 bl_entry->quirks, bl_entry->idVendor,
648 bl_entry->idProduct); 648 bl_entry->idProduct);
649 return bl_entry; 649 return bl_entry;