diff options
author | Joe Perches <joe@perches.com> | 2010-12-09 22:29:03 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-12-10 09:10:38 -0500 |
commit | 4291ee305e9bb0699504a66f0e2b7aefcf0512a5 (patch) | |
tree | 3996b77eb64d4f3b76a0799f30a5b2ba6cbc9ddb /drivers/hid/hid-roccat.c | |
parent | 5bea7660bba973dc5e8e9d92b11fb1dd5b524ebf (diff) |
HID: Add and use hid_<level>: dev_<level> equivalents
Neaten current uses of dev_<level> by adding and using
hid specific hid_<level> macros.
Convert existing uses of dev_<level> uses to hid_<level>.
Convert hid-pidff printk uses to hid_<level>.
Remove err_hid and use hid_err instead.
Add missing newlines to logging messages where necessary.
Coalesce format strings.
Add and use pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Other miscellaneous changes:
Add const struct hid_device * argument to hid-core functions
extract() and implement() so hid_<level> can be used by them.
Fix bad indentation in hid-core hid_input_field function
that calls extract() function above.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-roccat.c')
-rw-r--r-- | drivers/hid/hid-roccat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hid/hid-roccat.c b/drivers/hid/hid-roccat.c index a9d9b29ff47f..4bc7a93dc1f5 100644 --- a/drivers/hid/hid-roccat.c +++ b/drivers/hid/hid-roccat.c | |||
@@ -21,6 +21,8 @@ | |||
21 | * It is inspired by hidraw, but uses only one circular buffer for all readers. | 21 | * It is inspired by hidraw, but uses only one circular buffer for all readers. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
25 | |||
24 | #include <linux/cdev.h> | 26 | #include <linux/cdev.h> |
25 | #include <linux/poll.h> | 27 | #include <linux/poll.h> |
26 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
@@ -165,8 +167,7 @@ static int roccat_open(struct inode *inode, struct file *file) | |||
165 | mutex_lock(&device->readers_lock); | 167 | mutex_lock(&device->readers_lock); |
166 | 168 | ||
167 | if (!device) { | 169 | if (!device) { |
168 | printk(KERN_EMERG "roccat device with minor %d doesn't exist\n", | 170 | pr_emerg("roccat device with minor %d doesn't exist\n", minor); |
169 | minor); | ||
170 | error = -ENODEV; | 171 | error = -ENODEV; |
171 | goto exit_err; | 172 | goto exit_err; |
172 | } | 173 | } |
@@ -214,8 +215,7 @@ static int roccat_release(struct inode *inode, struct file *file) | |||
214 | device = devices[minor]; | 215 | device = devices[minor]; |
215 | if (!device) { | 216 | if (!device) { |
216 | mutex_unlock(&devices_lock); | 217 | mutex_unlock(&devices_lock); |
217 | printk(KERN_EMERG "roccat device with minor %d doesn't exist\n", | 218 | pr_emerg("roccat device with minor %d doesn't exist\n", minor); |
218 | minor); | ||
219 | return -ENODEV; | 219 | return -ENODEV; |
220 | } | 220 | } |
221 | 221 | ||
@@ -392,7 +392,7 @@ static int __init roccat_init(void) | |||
392 | roccat_major = MAJOR(dev_id); | 392 | roccat_major = MAJOR(dev_id); |
393 | 393 | ||
394 | if (retval < 0) { | 394 | if (retval < 0) { |
395 | printk(KERN_WARNING "roccat: can't get major number\n"); | 395 | pr_warn("can't get major number\n"); |
396 | return retval; | 396 | return retval; |
397 | } | 397 | } |
398 | 398 | ||