aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-microsoft.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-microsoft.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-microsoft.c')
-rw-r--r--drivers/hid/hid-microsoft.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
index dc618c33d0a2..0f6fc54dc196 100644
--- a/drivers/hid/hid-microsoft.c
+++ b/drivers/hid/hid-microsoft.c
@@ -40,8 +40,7 @@ static __u8 *ms_report_fixup(struct hid_device *hdev, __u8 *rdesc,
40 40
41 if ((quirks & MS_RDESC) && *rsize == 571 && rdesc[557] == 0x19 && 41 if ((quirks & MS_RDESC) && *rsize == 571 && rdesc[557] == 0x19 &&
42 rdesc[559] == 0x29) { 42 rdesc[559] == 0x29) {
43 dev_info(&hdev->dev, "fixing up Microsoft Wireless Receiver " 43 hid_info(hdev, "fixing up Microsoft Wireless Receiver Model 1028 report descriptor\n");
44 "Model 1028 report descriptor\n");
45 rdesc[557] = 0x35; 44 rdesc[557] = 0x35;
46 rdesc[559] = 0x45; 45 rdesc[559] = 0x45;
47 } 46 }
@@ -155,14 +154,14 @@ static int ms_probe(struct hid_device *hdev, const struct hid_device_id *id)
155 154
156 ret = hid_parse(hdev); 155 ret = hid_parse(hdev);
157 if (ret) { 156 if (ret) {
158 dev_err(&hdev->dev, "parse failed\n"); 157 hid_err(hdev, "parse failed\n");
159 goto err_free; 158 goto err_free;
160 } 159 }
161 160
162 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT | ((quirks & MS_HIDINPUT) ? 161 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT | ((quirks & MS_HIDINPUT) ?
163 HID_CONNECT_HIDINPUT_FORCE : 0)); 162 HID_CONNECT_HIDINPUT_FORCE : 0));
164 if (ret) { 163 if (ret) {
165 dev_err(&hdev->dev, "hw start failed\n"); 164 hid_err(hdev, "hw start failed\n");
166 goto err_free; 165 goto err_free;
167 } 166 }
168 167