aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-lg4ff.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-12-09 22:29:03 -0500
committerJiri Kosina <jkosina@suse.cz>2010-12-10 09:10:38 -0500
commit4291ee305e9bb0699504a66f0e2b7aefcf0512a5 (patch)
tree3996b77eb64d4f3b76a0799f30a5b2ba6cbc9ddb /drivers/hid/hid-lg4ff.c
parent5bea7660bba973dc5e8e9d92b11fb1dd5b524ebf (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-lg4ff.c')
-rw-r--r--drivers/hid/hid-lg4ff.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c
index 7eef5a2ce948..fa550c8e1d1b 100644
--- a/drivers/hid/hid-lg4ff.c
+++ b/drivers/hid/hid-lg4ff.c
@@ -101,20 +101,20 @@ int lg4ff_init(struct hid_device *hid)
101 101
102 /* Find the report to use */ 102 /* Find the report to use */
103 if (list_empty(report_list)) { 103 if (list_empty(report_list)) {
104 err_hid("No output report found"); 104 hid_err(hid, "No output report found\n");
105 return -1; 105 return -1;
106 } 106 }
107 107
108 /* Check that the report looks ok */ 108 /* Check that the report looks ok */
109 report = list_entry(report_list->next, struct hid_report, list); 109 report = list_entry(report_list->next, struct hid_report, list);
110 if (!report) { 110 if (!report) {
111 err_hid("NULL output report"); 111 hid_err(hid, "NULL output report\n");
112 return -1; 112 return -1;
113 } 113 }
114 114
115 field = report->field[0]; 115 field = report->field[0];
116 if (!field) { 116 if (!field) {
117 err_hid("NULL field"); 117 hid_err(hid, "NULL field\n");
118 return -1; 118 return -1;
119 } 119 }
120 120
@@ -129,8 +129,7 @@ int lg4ff_init(struct hid_device *hid)
129 if (test_bit(FF_AUTOCENTER, dev->ffbit)) 129 if (test_bit(FF_AUTOCENTER, dev->ffbit))
130 dev->ff->set_autocenter = hid_lg4ff_set_autocenter; 130 dev->ff->set_autocenter = hid_lg4ff_set_autocenter;
131 131
132 dev_info(&hid->dev, "Force feedback for Logitech Speed Force Wireless by " 132 hid_info(hid, "Force feedback for Logitech Speed Force Wireless by Simon Wood <simon@mungewell.org>\n");
133 "Simon Wood <simon@mungewell.org>\n");
134 return 0; 133 return 0;
135} 134}
136 135