@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
}
@@ -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);
@@ -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) {
@@ -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);
@@ -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;
@@ -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) {