aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-zydacron.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-zydacron.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-zydacron.c')
-rw-r--r--drivers/hid/hid-zydacron.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/hid/hid-zydacron.c b/drivers/hid/hid-zydacron.c
index aac1f927314..e90371508fd 100644
--- a/drivers/hid/hid-zydacron.c
+++ b/drivers/hid/hid-zydacron.c
@@ -34,9 +34,8 @@ static __u8 *zc_report_fixup(struct hid_device *hdev, __u8 *rdesc,
34 rdesc[0x96] == 0xbc && rdesc[0x97] == 0xff && 34 rdesc[0x96] == 0xbc && rdesc[0x97] == 0xff &&
35 rdesc[0xca] == 0xbc && rdesc[0xcb] == 0xff && 35 rdesc[0xca] == 0xbc && rdesc[0xcb] == 0xff &&
36 rdesc[0xe1] == 0xbc && rdesc[0xe2] == 0xff) { 36 rdesc[0xe1] == 0xbc && rdesc[0xe2] == 0xff) {
37 dev_info(&hdev->dev, 37 hid_info(hdev,
38 "fixing up zydacron remote control report " 38 "fixing up zydacron remote control report descriptor\n");
39 "descriptor\n");
40 rdesc[0x96] = rdesc[0xca] = rdesc[0xe1] = 0x0c; 39 rdesc[0x96] = rdesc[0xca] = rdesc[0xe1] = 0x0c;
41 rdesc[0x97] = rdesc[0xcb] = rdesc[0xe2] = 0x00; 40 rdesc[0x97] = rdesc[0xcb] = rdesc[0xe2] = 0x00;
42 } 41 }
@@ -172,7 +171,7 @@ static int zc_probe(struct hid_device *hdev, const struct hid_device_id *id)
172 171
173 zc = kzalloc(sizeof(*zc), GFP_KERNEL); 172 zc = kzalloc(sizeof(*zc), GFP_KERNEL);
174 if (zc == NULL) { 173 if (zc == NULL) {
175 dev_err(&hdev->dev, "zydacron: can't alloc descriptor\n"); 174 hid_err(hdev, "can't alloc descriptor\n");
176 return -ENOMEM; 175 return -ENOMEM;
177 } 176 }
178 177
@@ -180,13 +179,13 @@ static int zc_probe(struct hid_device *hdev, const struct hid_device_id *id)
180 179
181 ret = hid_parse(hdev); 180 ret = hid_parse(hdev);
182 if (ret) { 181 if (ret) {
183 dev_err(&hdev->dev, "zydacron: parse failed\n"); 182 hid_err(hdev, "parse failed\n");
184 goto err_free; 183 goto err_free;
185 } 184 }
186 185
187 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); 186 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
188 if (ret) { 187 if (ret) {
189 dev_err(&hdev->dev, "zydacron: hw start failed\n"); 188 hid_err(hdev, "hw start failed\n");
190 goto err_free; 189 goto err_free;
191 } 190 }
192 191