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 /include | |
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 'include')
-rw-r--r-- | include/linux/hid.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index e2af195d8b46..20b9801f669b 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -881,12 +881,32 @@ int hid_pidff_init(struct hid_device *hid); | |||
881 | #define hid_pidff_init NULL | 881 | #define hid_pidff_init NULL |
882 | #endif | 882 | #endif |
883 | 883 | ||
884 | #define dbg_hid(format, arg...) if (hid_debug) \ | 884 | #define dbg_hid(format, arg...) \ |
885 | printk(KERN_DEBUG "%s: " format ,\ | 885 | do { \ |
886 | __FILE__ , ## arg) | 886 | if (hid_debug) \ |
887 | #define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ | 887 | printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \ |
888 | __FILE__ , ## arg) | 888 | } while (0) |
889 | #endif /* HID_FF */ | 889 | |
890 | #define hid_printk(level, hid, fmt, arg...) \ | ||
891 | dev_printk(level, &(hid)->dev, fmt, ##arg) | ||
892 | #define hid_emerg(hid, fmt, arg...) \ | ||
893 | dev_emerg(&(hid)->dev, fmt, ##arg) | ||
894 | #define hid_crit(hid, fmt, arg...) \ | ||
895 | dev_crit(&(hid)->dev, fmt, ##arg) | ||
896 | #define hid_alert(hid, fmt, arg...) \ | ||
897 | dev_alert(&(hid)->dev, fmt, ##arg) | ||
898 | #define hid_err(hid, fmt, arg...) \ | ||
899 | dev_err(&(hid)->dev, fmt, ##arg) | ||
900 | #define hid_notice(hid, fmt, arg...) \ | ||
901 | dev_notice(&(hid)->dev, fmt, ##arg) | ||
902 | #define hid_warn(hid, fmt, arg...) \ | ||
903 | dev_warn(&(hid)->dev, fmt, ##arg) | ||
904 | #define hid_info(hid, fmt, arg...) \ | ||
905 | dev_info(&(hid)->dev, fmt, ##arg) | ||
906 | #define hid_dbg(hid, fmt, arg...) \ | ||
907 | dev_dbg(&(hid)->dev, fmt, ##arg) | ||
908 | |||
909 | #endif /* __KERNEL__ */ | ||
890 | 910 | ||
891 | #endif | 911 | #endif |
892 | 912 | ||