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-gaff.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-gaff.c')
-rw-r--r-- | drivers/hid/hid-gaff.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/hid/hid-gaff.c b/drivers/hid/hid-gaff.c index 88dfcf49a5d7..279ba530003c 100644 --- a/drivers/hid/hid-gaff.c +++ b/drivers/hid/hid-gaff.c | |||
@@ -87,7 +87,7 @@ static int gaff_init(struct hid_device *hid) | |||
87 | int error; | 87 | int error; |
88 | 88 | ||
89 | if (list_empty(report_list)) { | 89 | if (list_empty(report_list)) { |
90 | dev_err(&hid->dev, "no output reports found\n"); | 90 | hid_err(hid, "no output reports found\n"); |
91 | return -ENODEV; | 91 | return -ENODEV; |
92 | } | 92 | } |
93 | 93 | ||
@@ -95,12 +95,12 @@ static int gaff_init(struct hid_device *hid) | |||
95 | 95 | ||
96 | report = list_entry(report_ptr, struct hid_report, list); | 96 | report = list_entry(report_ptr, struct hid_report, list); |
97 | if (report->maxfield < 1) { | 97 | if (report->maxfield < 1) { |
98 | dev_err(&hid->dev, "no fields in the report\n"); | 98 | hid_err(hid, "no fields in the report\n"); |
99 | return -ENODEV; | 99 | return -ENODEV; |
100 | } | 100 | } |
101 | 101 | ||
102 | if (report->field[0]->report_count < 6) { | 102 | if (report->field[0]->report_count < 6) { |
103 | dev_err(&hid->dev, "not enough values in the field\n"); | 103 | hid_err(hid, "not enough values in the field\n"); |
104 | return -ENODEV; | 104 | return -ENODEV; |
105 | } | 105 | } |
106 | 106 | ||
@@ -128,8 +128,7 @@ static int gaff_init(struct hid_device *hid) | |||
128 | 128 | ||
129 | usbhid_submit_report(hid, gaff->report, USB_DIR_OUT); | 129 | usbhid_submit_report(hid, gaff->report, USB_DIR_OUT); |
130 | 130 | ||
131 | dev_info(&hid->dev, "Force Feedback for GreenAsia 0x12" | 131 | hid_info(hid, "Force Feedback for GreenAsia 0x12 devices by Lukasz Lubojanski <lukasz@lubojanski.info>\n"); |
132 | " devices by Lukasz Lubojanski <lukasz@lubojanski.info>\n"); | ||
133 | 132 | ||
134 | return 0; | 133 | return 0; |
135 | } | 134 | } |
@@ -148,13 +147,13 @@ static int ga_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
148 | 147 | ||
149 | ret = hid_parse(hdev); | 148 | ret = hid_parse(hdev); |
150 | if (ret) { | 149 | if (ret) { |
151 | dev_err(&hdev->dev, "parse failed\n"); | 150 | hid_err(hdev, "parse failed\n"); |
152 | goto err; | 151 | goto err; |
153 | } | 152 | } |
154 | 153 | ||
155 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); | 154 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); |
156 | if (ret) { | 155 | if (ret) { |
157 | dev_err(&hdev->dev, "hw start failed\n"); | 156 | hid_err(hdev, "hw start failed\n"); |
158 | goto err; | 157 | goto err; |
159 | } | 158 | } |
160 | 159 | ||