aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-zpff.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-zpff.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-zpff.c')
-rw-r--r--drivers/hid/hid-zpff.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/hid/hid-zpff.c b/drivers/hid/hid-zpff.c
index b7acceabba80..f31fab012f2f 100644
--- a/drivers/hid/hid-zpff.c
+++ b/drivers/hid/hid-zpff.c
@@ -75,14 +75,14 @@ static int zpff_init(struct hid_device *hid)
75 int error; 75 int error;
76 76
77 if (list_empty(report_list)) { 77 if (list_empty(report_list)) {
78 dev_err(&hid->dev, "no output report found\n"); 78 hid_err(hid, "no output report found\n");
79 return -ENODEV; 79 return -ENODEV;
80 } 80 }
81 81
82 report = list_entry(report_list->next, struct hid_report, list); 82 report = list_entry(report_list->next, struct hid_report, list);
83 83
84 if (report->maxfield < 4) { 84 if (report->maxfield < 4) {
85 dev_err(&hid->dev, "not enough fields in report\n"); 85 hid_err(hid, "not enough fields in report\n");
86 return -ENODEV; 86 return -ENODEV;
87 } 87 }
88 88
@@ -105,8 +105,7 @@ static int zpff_init(struct hid_device *hid)
105 zpff->report->field[3]->value[0] = 0x00; 105 zpff->report->field[3]->value[0] = 0x00;
106 usbhid_submit_report(hid, zpff->report, USB_DIR_OUT); 106 usbhid_submit_report(hid, zpff->report, USB_DIR_OUT);
107 107
108 dev_info(&hid->dev, "force feedback for Zeroplus based devices by " 108 hid_info(hid, "force feedback for Zeroplus based devices by Anssi Hannula <anssi.hannula@gmail.com>\n");
109 "Anssi Hannula <anssi.hannula@gmail.com>\n");
110 109
111 return 0; 110 return 0;
112} 111}
@@ -123,13 +122,13 @@ static int zp_probe(struct hid_device *hdev, const struct hid_device_id *id)
123 122
124 ret = hid_parse(hdev); 123 ret = hid_parse(hdev);
125 if (ret) { 124 if (ret) {
126 dev_err(&hdev->dev, "parse failed\n"); 125 hid_err(hdev, "parse failed\n");
127 goto err; 126 goto err;
128 } 127 }
129 128
130 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); 129 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);
131 if (ret) { 130 if (ret) {
132 dev_err(&hdev->dev, "hw start failed\n"); 131 hid_err(hdev, "hw start failed\n");
133 goto err; 132 goto err;
134 } 133 }
135 134