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-lg2ff.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-lg2ff.c')
-rw-r--r-- | drivers/hid/hid-lg2ff.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/hid/hid-lg2ff.c b/drivers/hid/hid-lg2ff.c index 4258253c36b..3c31bc650e5 100644 --- a/drivers/hid/hid-lg2ff.c +++ b/drivers/hid/hid-lg2ff.c | |||
@@ -72,18 +72,18 @@ int lg2ff_init(struct hid_device *hid) | |||
72 | int error; | 72 | int error; |
73 | 73 | ||
74 | if (list_empty(report_list)) { | 74 | if (list_empty(report_list)) { |
75 | dev_err(&hid->dev, "no output report found\n"); | 75 | hid_err(hid, "no output report found\n"); |
76 | return -ENODEV; | 76 | return -ENODEV; |
77 | } | 77 | } |
78 | 78 | ||
79 | report = list_entry(report_list->next, struct hid_report, list); | 79 | report = list_entry(report_list->next, struct hid_report, list); |
80 | 80 | ||
81 | if (report->maxfield < 1) { | 81 | if (report->maxfield < 1) { |
82 | dev_err(&hid->dev, "output report is empty\n"); | 82 | hid_err(hid, "output report is empty\n"); |
83 | return -ENODEV; | 83 | return -ENODEV; |
84 | } | 84 | } |
85 | if (report->field[0]->report_count < 7) { | 85 | if (report->field[0]->report_count < 7) { |
86 | dev_err(&hid->dev, "not enough values in the field\n"); | 86 | hid_err(hid, "not enough values in the field\n"); |
87 | return -ENODEV; | 87 | return -ENODEV; |
88 | } | 88 | } |
89 | 89 | ||
@@ -110,8 +110,7 @@ int lg2ff_init(struct hid_device *hid) | |||
110 | 110 | ||
111 | usbhid_submit_report(hid, report, USB_DIR_OUT); | 111 | usbhid_submit_report(hid, report, USB_DIR_OUT); |
112 | 112 | ||
113 | dev_info(&hid->dev, "Force feedback for Logitech RumblePad/Rumblepad 2 by " | 113 | hid_info(hid, "Force feedback for Logitech RumblePad/Rumblepad 2 by Anssi Hannula <anssi.hannula@gmail.com>\n"); |
114 | "Anssi Hannula <anssi.hannula@gmail.com>\n"); | ||
115 | 114 | ||
116 | return 0; | 115 | return 0; |
117 | } | 116 | } |