diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 08:15:37 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 08:15:37 -0800 |
commit | facc7a96d443d84060a8679c3fcc51d20d4981c3 (patch) | |
tree | e2d633b07766609aedac0708adcde2bc2e37e68a /drivers/hid/usbhid/usbkbd.c | |
parent | c8940eca75e6d1ea57f6c491a30bd1023c64c9ad (diff) | |
parent | 4ead36407b41eae942c8c9f70ef963cd369c90e2 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (34 commits)
HID: roccat: Update sysfs attribute doc
HID: roccat: don't use #pragma pack
HID: roccat: Add support for Roccat Kone[+] v2
HID: roccat: reduce number of functions in kone and pyra drivers
HID: roccat: declare meaning of pack pragma usage in driver headers
HID: roccat: use class for char device for sysfs attribute creation
sysfs: Introducing binary attributes for struct class
HID: hidraw: add compatibility ioctl() for 32-bit applications.
HID: hid-picolcd: Fix memory leak in picolcd_debug_out_report()
HID: picolcd: fix misuse of logical operation in place of bitop
HID: usbhid: base runtime PM on modern API
HID: replace offsets values with their corresponding BTN_* defines
HID: hid-mosart: support suspend/resume
HID: hid-mosart: ignore buttons report
HID: hid-picolcd: don't use flush_scheduled_work()
HID: simplify an index check in hid_lookup_collection
HID: Hoist assigns from ifs
HID: Remove superfluous __inline__
HID: Use vzalloc for vmalloc/memset(,0...)
HID: Add and use hid_<level>: dev_<level> equivalents
...
Diffstat (limited to 'drivers/hid/usbhid/usbkbd.c')
-rw-r--r-- | drivers/hid/usbhid/usbkbd.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c index a948605564f..065817329f0 100644 --- a/drivers/hid/usbhid/usbkbd.c +++ b/drivers/hid/usbhid/usbkbd.c @@ -24,6 +24,8 @@ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/kernel.h> #include <linux/slab.h> #include <linux/module.h> @@ -104,16 +106,18 @@ static void usb_kbd_irq(struct urb *urb) if (usb_kbd_keycode[kbd->old[i]]) input_report_key(kbd->dev, usb_kbd_keycode[kbd->old[i]], 0); else - dev_info(&urb->dev->dev, - "Unknown key (scancode %#x) released.\n", kbd->old[i]); + hid_info(urb->dev, + "Unknown key (scancode %#x) released.\n", + kbd->old[i]); } if (kbd->new[i] > 3 && memscan(kbd->old + 2, kbd->new[i], 6) == kbd->old + 8) { if (usb_kbd_keycode[kbd->new[i]]) input_report_key(kbd->dev, usb_kbd_keycode[kbd->new[i]], 1); else - dev_info(&urb->dev->dev, - "Unknown key (scancode %#x) released.\n", kbd->new[i]); + hid_info(urb->dev, + "Unknown key (scancode %#x) released.\n", + kbd->new[i]); } } @@ -124,9 +128,9 @@ static void usb_kbd_irq(struct urb *urb) resubmit: i = usb_submit_urb (urb, GFP_ATOMIC); if (i) - err_hid ("can't resubmit intr, %s-%s/input0, status %d", - kbd->usbdev->bus->bus_name, - kbd->usbdev->devpath, i); + hid_err(urb->dev, "can't resubmit intr, %s-%s/input0, status %d", + kbd->usbdev->bus->bus_name, + kbd->usbdev->devpath, i); } static int usb_kbd_event(struct input_dev *dev, unsigned int type, @@ -150,7 +154,7 @@ static int usb_kbd_event(struct input_dev *dev, unsigned int type, *(kbd->leds) = kbd->newleds; kbd->led->dev = kbd->usbdev; if (usb_submit_urb(kbd->led, GFP_ATOMIC)) - err_hid("usb_submit_urb(leds) failed"); + pr_err("usb_submit_urb(leds) failed\n"); return 0; } @@ -160,7 +164,7 @@ static void usb_kbd_led(struct urb *urb) struct usb_kbd *kbd = urb->context; if (urb->status) - dev_warn(&urb->dev->dev, "led urb status %d received\n", + hid_warn(urb->dev, "led urb status %d received\n", urb->status); if (*(kbd->leds) == kbd->newleds) @@ -169,7 +173,7 @@ static void usb_kbd_led(struct urb *urb) *(kbd->leds) = kbd->newleds; kbd->led->dev = kbd->usbdev; if (usb_submit_urb(kbd->led, GFP_ATOMIC)) - err_hid("usb_submit_urb(leds) failed"); + hid_err(urb->dev, "usb_submit_urb(leds) failed\n"); } static int usb_kbd_open(struct input_dev *dev) |