From patchwork Tue Mar 29 17:22:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yuen@klacno.sk X-Patchwork-Id: 671832 X-Patchwork-Delegate: jikos@jikos.cz Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2THoiHE016469 for ; Tue, 29 Mar 2011 17:50:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751221Ab1C2Run (ORCPT ); Tue, 29 Mar 2011 13:50:43 -0400 Received: from gs1.klacno.sk ([188.123.104.170]:42356 "EHLO gs1.klacno.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212Ab1C2Rum (ORCPT ); Tue, 29 Mar 2011 13:50:42 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 29 Mar 2011 17:50:44 +0000 (UTC) X-Greylist: delayed 1707 seconds by postgrey-1.27 at vger.kernel.org; Tue, 29 Mar 2011 13:50:41 EDT Received: from localhost (localhost.localdomain [127.0.0.1]) by gs1.klacno.sk (Postfix) with ESMTP id DCC7F2009F; Tue, 29 Mar 2011 19:22:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=klacno.sk; h= content-type:content-type:mime-version:user-agent:from:from :subject:subject:date:date:message-id:received:received :received; s=default; t=1301419331; x=1303233731; bh=VZxHPi6QPZY E5ZeIFZXfiaIMZUz9fTRyiJIV0Lqq3u8=; b=iAML9O3Qoz7mCuHGAxshaSeZqwI jsuDzpqh5/P8+YeEI1pyYQwtQiG2uzQJ+B5bRH+/y/VVBAY3pdIp762YeZsjzmIk K6gSIH+KA/LImlwH8WmttmjoQLdOwTZqhjXQXWbXCI9Iy/xuumOwHMuY/nl/7cbH Rhuli24awwV4d8jo= X-Virus-Scanned: amavisd-new at klacno.sk Received: from gs1.klacno.sk ([127.0.0.1]) by localhost (localhost.localdomain [127.0.0.1]) (amavisd-new, port 10026) with LMTP id l-lDnlkBXAvH; Tue, 29 Mar 2011 19:22:11 +0200 (CEST) Received: from webmail.klacno.sk (webhost.klacno.sk [188.123.104.173]) by gs1.klacno.sk (Postfix) with ESMTP id 82F232008F; Tue, 29 Mar 2011 19:22:07 +0200 (CEST) Received: from 10.125.50.141 (SquirrelMail authenticated user yuen) by webmail.klacno.sk with HTTP; Tue, 29 Mar 2011 19:22:11 +0200 (CEST) Message-ID: <59133.10.125.50.141.1301419331.squirrel@webmail.klacno.sk> Date: Tue, 29 Mar 2011 19:22:11 +0200 (CEST) Subject: Convert HID debugging messages to pr_debug From: yuen@klacno.sk To: jkosina@suse.cz User-Agent: SquirrelMail/1.4.8-5.el5.centos.10 MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org diff -uprN -X linux-2.6.38.2/Documentation/dontdiff linux-2.6.38.2/drivers/hid/hid-axff.c linux-2.6.38.2.new/drivers/hid/hid-axff.c --- linux-2.6.38.2/drivers/hid/hid-axff.c 2011-03-29 16:58:21.614980857 +0200 +++ linux-2.6.38.2.new/drivers/hid/hid-axff.c 2011-03-29 15:08:11.174124811 +0200 @@ -50,7 +50,7 @@ static int axff_play(struct input_dev *d left = effect->u.rumble.strong_magnitude; right = effect->u.rumble.weak_magnitude; - HID_DBG("called with 0x%04x 0x%04x", left, right); + hid_dbg(hid, "called with 0x%04x 0x%04x", left, right); left = left * 0xff / 0xffff; right = right * 0xff / 0xffff; @@ -59,7 +59,7 @@ static int axff_play(struct input_dev *d axff->report->field[1]->value[0] = right; axff->report->field[2]->value[0] = left; axff->report->field[3]->value[0] = right; - HID_DBG("running with 0x%02x 0x%02x", left, right); + hid_dbg(hid, "running with 0x%02x 0x%02x", left, right); usbhid_submit_report(hid, axff->report, USB_DIR_OUT); return 0; diff -uprN -X linux-2.6.38.2/Documentation/dontdiff linux-2.6.38.2/drivers/hid/hid-drff.c linux-2.6.38.2.new/drivers/hid/hid-drff.c --- linux-2.6.38.2/drivers/hid/hid-drff.c 2011-03-29 16:58:21.648314009 +0200 +++ linux-2.6.38.2.new/drivers/hid/hid-drff.c 2011-03-29 15:06:42.064608787 +0200 @@ -51,7 +51,7 @@ static int drff_play(struct input_dev *d strong = effect->u.rumble.strong_magnitude; weak = effect->u.rumble.weak_magnitude; - HID_DBG("called with 0x%04x 0x%04x", strong, weak); + hid_dbg(hid, "called with 0x%04x 0x%04x", strong, weak); if (strong || weak) { strong = strong * 0xff / 0xffff; @@ -78,7 +78,7 @@ static int drff_play(struct input_dev *d drff->report->field[0]->value[2] = 0x00; drff->report->field[0]->value[4] = 0x00; - HID_DBG("running with 0x%02x 0x%02x", strong, weak); + hid_dbg(hid, "running with 0x%02x 0x%02x", strong, weak); usbhid_submit_report(hid, drff->report, USB_DIR_OUT); return 0; diff -uprN -X linux-2.6.38.2/Documentation/dontdiff linux-2.6.38.2/drivers/hid/hid-emsff.c linux-2.6.38.2.new/drivers/hid/hid-emsff.c --- linux-2.6.38.2/drivers/hid/hid-emsff.c 2011-03-29 16:58:21.648314009 +0200 +++ linux-2.6.38.2.new/drivers/hid/hid-emsff.c 2011-03-29 15:06:09.074784734 +0200 @@ -42,7 +42,7 @@ static int emsff_play(struct input_dev * weak = effect->u.rumble.weak_magnitude; strong = effect->u.rumble.strong_magnitude; - HID_DBG("called with 0x%04x 0x%04x\n", strong, weak); + hid_dbg(hid, "called with 0x%04x 0x%04x\n", strong, weak); weak = weak * 0xff / 0xffff; strong = strong * 0xff / 0xffff; @@ -50,7 +50,7 @@ static int emsff_play(struct input_dev * emsff->report->field[0]->value[1] = weak; emsff->report->field[0]->value[2] = strong; - HID_DBG("running with 0x%02x 0x%02x\n", strong, weak); + hid_dbg(hid, "running with 0x%02x 0x%02x\n", strong, weak); usbhid_submit_report(hid, emsff->report, USB_DIR_OUT); return 0; diff -uprN -X linux-2.6.38.2/Documentation/dontdiff linux-2.6.38.2/drivers/hid/hid-gaff.c linux-2.6.38.2.new/drivers/hid/hid-gaff.c --- linux-2.6.38.2/drivers/hid/hid-gaff.c 2011-03-29 16:58:21.648314009 +0200 +++ linux-2.6.38.2.new/drivers/hid/hid-gaff.c 2011-03-29 15:00:31.226616922 +0200 @@ -50,7 +50,7 @@ static int hid_gaff_play(struct input_de left = effect->u.rumble.strong_magnitude; right = effect->u.rumble.weak_magnitude; - HID_DBG("called with 0x%04x 0x%04x", left, right); + hid_dbg(hid, "called with 0x%04x 0x%04x", left, right); left = left * 0xfe / 0xffff; right = right * 0xfe / 0xffff; @@ -61,7 +61,8 @@ static int hid_gaff_play(struct input_de gaff->report->field[0]->value[3] = 0; gaff->report->field[0]->value[4] = left; gaff->report->field[0]->value[5] = 0; - HID_DBG("running with 0x%02x 0x%02x", left, right); + hid_dbg(hid, "running with 0x%02x 0x%02x", left, right); + usbhid_submit_report(hid, gaff->report, USB_DIR_OUT); gaff->report->field[0]->value[0] = 0xfa; diff -uprN -X linux-2.6.38.2/Documentation/dontdiff linux-2.6.38.2/drivers/hid/hid-lg4ff.c linux-2.6.38.2.new/drivers/hid/hid-lg4ff.c --- linux-2.6.38.2/drivers/hid/hid-lg4ff.c 2011-03-29 16:58:21.651647324 +0200 +++ linux-2.6.38.2.new/drivers/hid/hid-lg4ff.c 2011-03-29 15:00:44.336546873 +0200 @@ -61,7 +61,7 @@ static int hid_lg4ff_play(struct input_d report->field[0]->value[4] = 0x00; report->field[0]->value[5] = 0x08; report->field[0]->value[6] = 0x00; - HID_DBG("Autocenter, x=0x%02X\n", x); + hid_dbg(hid, "Autocenter, x=0x%02X\n", x); usbhid_submit_report(hid, report, USB_DIR_OUT); break; diff -uprN -X linux-2.6.38.2/Documentation/dontdiff linux-2.6.38.2/drivers/hid/hid-lgff.c linux-2.6.38.2.new/drivers/hid/hid-lgff.c --- linux-2.6.38.2/drivers/hid/hid-lgff.c 2011-03-29 16:58:21.651647324 +0200 +++ linux-2.6.38.2.new/drivers/hid/hid-lgff.c 2011-03-29 15:04:46.511900218 +0200 @@ -96,7 +96,7 @@ static int hid_lgff_play(struct input_de report->field[0]->value[1] = 0x08; report->field[0]->value[2] = x; report->field[0]->value[3] = y; - HID_DBG("(x, y)=(%04x, %04x)\n", x, y); + hid_dbg(hid, "(x, y)=(%04x, %04x)\n", x, y); usbhid_submit_report(hid, report, USB_DIR_OUT); break; @@ -111,7 +111,7 @@ static int hid_lgff_play(struct input_de report->field[0]->value[1] = 0x00; report->field[0]->value[2] = left; report->field[0]->value[3] = right; - HID_DBG("(left, right)=(%04x, %04x)\n", left, right); + hid_dbg(hid, "(left, right)=(%04x, %04x)\n", left, right); usbhid_submit_report(hid, report, USB_DIR_OUT); break; } diff -uprN -X linux-2.6.38.2/Documentation/dontdiff linux-2.6.38.2/drivers/hid/hid-picolcd.c linux-2.6.38.2.new/drivers/hid/hid-picolcd.c --- linux-2.6.38.2/drivers/hid/hid-picolcd.c 2011-03-29 16:58:21.654980639 +0200 +++ linux-2.6.38.2.new/drivers/hid/hid-picolcd.c 2011-03-29 16:43:43.533071245 +0200 @@ -1276,8 +1276,9 @@ static int picolcd_raw_keypad(struct pic else key_code = KEY_UNKNOWN; if (key_code != KEY_UNKNOWN) { - HID_DBG(PICOLCD_NAME " got key press for %u:%d", - raw_data[i], key_code); + hid_dbg(report->device, + PICOLCD_NAME " got key press for %u:%d", + raw_data[i], key_code); input_report_key(data->input_keys, key_code, 1); } input_sync(data->input_keys); @@ -1299,8 +1300,9 @@ key_already_down: else key_code = KEY_UNKNOWN; if (key_code != KEY_UNKNOWN) { - HID_DBG(PICOLCD_NAME " got key release for %u:%d", - data->pressed_keys[j], key_code); + hid_dbg(report->device, + PICOLCD_NAME " got key release for %u:%d", + data->pressed_keys[j], key_code); input_report_key(data->input_keys, key_code, 0); } input_sync(data->input_keys); @@ -2412,7 +2414,7 @@ static int picolcd_suspend(struct hid_de return 0; picolcd_suspend_backlight(hid_get_drvdata(hdev)); - HID_DBG(PICOLCD_NAME " device ready for suspend\n"); + hid_dbg(hdev, PICOLCD_NAME " device ready for suspend\n"); return 0; } @@ -2421,7 +2423,8 @@ static int picolcd_resume(struct hid_dev int ret; ret = picolcd_resume_backlight(hid_get_drvdata(hdev)); if (ret) - HID_DBG(PICOLCD_NAME " restoring backlight failed: %d\n", ret); + hid_dbg(hdev, PICOLCD_NAME " restoring backlight failed: %d\n", + ret); return 0; } @@ -2430,16 +2433,19 @@ static int picolcd_reset_resume(struct h int ret; ret = picolcd_reset(hdev); if (ret) - HID_DBG(PICOLCD_NAME " resetting our device failed: %d\n", ret); + hid_dbg(hdev, PICOLCD_NAME " resetting our device failed: %d\n", + ret); ret = picolcd_fb_reset(hid_get_drvdata(hdev), 0); if (ret) - HID_DBG(PICOLCD_NAME " restoring framebuffer content failed: %d\n", ret); + hid_dbg(hdev, PICOLCD_NAME + " restoring framebuffer content failed: %d\n", ret); ret = picolcd_resume_lcd(hid_get_drvdata(hdev)); if (ret) - HID_DBG(PICOLCD_NAME " restoring lcd failed: %d\n", ret); + hid_dbg(hdev, PICOLCD_NAME " restoring lcd failed: %d\n", ret); ret = picolcd_resume_backlight(hid_get_drvdata(hdev)); if (ret) - HID_DBG(PICOLCD_NAME " restoring backlight failed: %d\n", ret); + hid_dbg(hdev, PICOLCD_NAME " restoring backlight failed: %d\n", + ret); picolcd_leds_set(hid_get_drvdata(hdev)); return 0; } @@ -2595,7 +2601,7 @@ static int picolcd_probe(struct hid_devi struct picolcd_data *data; int error = -ENOMEM; - HID_DBG(PICOLCD_NAME " hardware probe...\n"); + hid_dbg(hdev, PICOLCD_NAME " hardware probe...\n"); /* * Let's allocate the picolcd data structure, set some reasonable @@ -2658,7 +2664,7 @@ static int picolcd_probe(struct hid_devi if (error) goto err_cleanup_sysfs2; - HID_DBG(PICOLCD_NAME " activated and initialized\n"); + hid_dbg(hdev, PICOLCD_NAME " activated and initialized\n"); return 0; err_cleanup_sysfs2: @@ -2682,7 +2688,7 @@ static void picolcd_remove(struct hid_de struct picolcd_data *data = hid_get_drvdata(hdev); unsigned long flags; - HID_DBG(PICOLCD_NAME " hardware remove...\n"); + hid_dbg(hdev, PICOLCD_NAME " hardware remove...\n"); spin_lock_irqsave(&data->lock, flags); data->status |= PICOLCD_FAILED; spin_unlock_irqrestore(&data->lock, flags); diff -uprN -X linux-2.6.38.2/Documentation/dontdiff linux-2.6.38.2/drivers/hid/hid-samsung.c linux-2.6.38.2.new/drivers/hid/hid-samsung.c --- linux-2.6.38.2/drivers/hid/hid-samsung.c 2011-03-29 16:58:21.661647270 +0200 +++ linux-2.6.38.2.new/drivers/hid/hid-samsung.c 2011-03-29 14:59:33.406930570 +0200 @@ -108,7 +108,8 @@ static int samsung_kbd_mouse_input_mappi if (1 != ifnum || HID_UP_CONSUMER != (usage->hid & HID_USAGE_PAGE)) return 0; - HID_DBG("samsung wireless keyboard/mouse input mapping event [0x%x]\n", + hid_dbg(hdev, + "samsung wireless keyboard/mouse input mapping event [0x%x]\n", usage->hid & HID_USAGE); switch (usage->hid & HID_USAGE) { diff -uprN -X linux-2.6.38.2/Documentation/dontdiff linux-2.6.38.2/drivers/hid/hid-tmff.c linux-2.6.38.2.new/drivers/hid/hid-tmff.c --- linux-2.6.38.2/drivers/hid/hid-tmff.c 2011-03-29 16:58:21.664980586 +0200 +++ linux-2.6.38.2.new/drivers/hid/hid-tmff.c 2011-03-29 15:07:39.827629180 +0200 @@ -99,7 +99,7 @@ static int tmff_play(struct input_dev *d ff_field->logical_minimum, ff_field->logical_maximum); - HID_DBG("(x, y)=(%04x, %04x)\n", x, y); + hid_dbg(hid, "(x, y)=(%04x, %04x)\n", x, y); ff_field->value[0] = x; ff_field->value[1] = y; usbhid_submit_report(hid, tmff->report, USB_DIR_OUT); @@ -113,7 +113,7 @@ static int tmff_play(struct input_dev *d ff_field->logical_minimum, ff_field->logical_maximum); - HID_DBG("(left,right)=(%08x, %08x)\n", left, right); + hid_dbg(hid, "(left,right)=(%08x, %08x)\n", left, right); ff_field->value[0] = left; ff_field->value[1] = right; usbhid_submit_report(hid, tmff->report, USB_DIR_OUT); diff -uprN -X linux-2.6.38.2/Documentation/dontdiff linux-2.6.38.2/drivers/hid/hid-zpff.c linux-2.6.38.2.new/drivers/hid/hid-zpff.c --- linux-2.6.38.2/drivers/hid/hid-zpff.c 2011-03-29 16:58:21.664980586 +0200 +++ linux-2.6.38.2.new/drivers/hid/hid-zpff.c 2011-03-29 15:05:21.141713858 +0200 @@ -50,14 +50,14 @@ static int zpff_play(struct input_dev *d left = effect->u.rumble.strong_magnitude; right = effect->u.rumble.weak_magnitude; - HID_DBG("called with 0x%04x 0x%04x\n", left, right); + hid_dbg(hid, "called with 0x%04x 0x%04x\n", left, right); left = left * 0x7f / 0xffff; right = right * 0x7f / 0xffff; zpff->report->field[2]->value[0] = left; zpff->report->field[3]->value[0] = right; - HID_DBG("running with 0x%02x 0x%02x\n", left, right); + hid_dbg(hid, "running with 0x%02x 0x%02x\n", left, right); usbhid_submit_report(hid, zpff->report, USB_DIR_OUT); return 0; diff -uprN -X linux-2.6.38.2/Documentation/dontdiff linux-2.6.38.2/drivers/hid/hid-zydacron.c linux-2.6.38.2.new/drivers/hid/hid-zydacron.c --- linux-2.6.38.2/drivers/hid/hid-zydacron.c 2011-03-29 16:58:21.664980586 +0200 +++ linux-2.6.38.2.new/drivers/hid/hid-zydacron.c 2011-03-29 15:07:05.721147273 +0200 @@ -56,7 +56,7 @@ static int zc_input_mapping(struct hid_d if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) return 0; - HID_DBG("zynacron input mapping event [0x%x]\n", + hid_dbg(hdev, "zynacron input mapping event [0x%x]\n", usage->hid & HID_USAGE); switch (usage->hid & HID_USAGE) {