diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:15:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:15:37 -0500 |
commit | facc7a96d443d84060a8679c3fcc51d20d4981c3 (patch) | |
tree | e2d633b07766609aedac0708adcde2bc2e37e68a /drivers/hid/hid-tmff.c | |
parent | c8940eca75e6d1ea57f6c491a30bd1023c64c9ad (diff) | |
parent | 4ead36407b41eae942c8c9f70ef963cd369c90e2 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (34 commits)
HID: roccat: Update sysfs attribute doc
HID: roccat: don't use #pragma pack
HID: roccat: Add support for Roccat Kone[+] v2
HID: roccat: reduce number of functions in kone and pyra drivers
HID: roccat: declare meaning of pack pragma usage in driver headers
HID: roccat: use class for char device for sysfs attribute creation
sysfs: Introducing binary attributes for struct class
HID: hidraw: add compatibility ioctl() for 32-bit applications.
HID: hid-picolcd: Fix memory leak in picolcd_debug_out_report()
HID: picolcd: fix misuse of logical operation in place of bitop
HID: usbhid: base runtime PM on modern API
HID: replace offsets values with their corresponding BTN_* defines
HID: hid-mosart: support suspend/resume
HID: hid-mosart: ignore buttons report
HID: hid-picolcd: don't use flush_scheduled_work()
HID: simplify an index check in hid_lookup_collection
HID: Hoist assigns from ifs
HID: Remove superfluous __inline__
HID: Use vzalloc for vmalloc/memset(,0...)
HID: Add and use hid_<level>: dev_<level> equivalents
...
Diffstat (limited to 'drivers/hid/hid-tmff.c')
-rw-r--r-- | drivers/hid/hid-tmff.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/hid/hid-tmff.c b/drivers/hid/hid-tmff.c index 25be4e1461bd..575862b0688e 100644 --- a/drivers/hid/hid-tmff.c +++ b/drivers/hid/hid-tmff.c | |||
@@ -151,28 +151,23 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits) | |||
151 | switch (field->usage[0].hid) { | 151 | switch (field->usage[0].hid) { |
152 | case THRUSTMASTER_USAGE_FF: | 152 | case THRUSTMASTER_USAGE_FF: |
153 | if (field->report_count < 2) { | 153 | if (field->report_count < 2) { |
154 | dev_warn(&hid->dev, "ignoring FF field " | 154 | hid_warn(hid, "ignoring FF field with report_count < 2\n"); |
155 | "with report_count < 2\n"); | ||
156 | continue; | 155 | continue; |
157 | } | 156 | } |
158 | 157 | ||
159 | if (field->logical_maximum == | 158 | if (field->logical_maximum == |
160 | field->logical_minimum) { | 159 | field->logical_minimum) { |
161 | dev_warn(&hid->dev, "ignoring FF field " | 160 | hid_warn(hid, "ignoring FF field with logical_maximum == logical_minimum\n"); |
162 | "with logical_maximum " | ||
163 | "== logical_minimum\n"); | ||
164 | continue; | 161 | continue; |
165 | } | 162 | } |
166 | 163 | ||
167 | if (tmff->report && tmff->report != report) { | 164 | if (tmff->report && tmff->report != report) { |
168 | dev_warn(&hid->dev, "ignoring FF field " | 165 | hid_warn(hid, "ignoring FF field in other report\n"); |
169 | "in other report\n"); | ||
170 | continue; | 166 | continue; |
171 | } | 167 | } |
172 | 168 | ||
173 | if (tmff->ff_field && tmff->ff_field != field) { | 169 | if (tmff->ff_field && tmff->ff_field != field) { |
174 | dev_warn(&hid->dev, "ignoring " | 170 | hid_warn(hid, "ignoring duplicate FF field\n"); |
175 | "duplicate FF field\n"); | ||
176 | continue; | 171 | continue; |
177 | } | 172 | } |
178 | 173 | ||
@@ -185,16 +180,15 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits) | |||
185 | break; | 180 | break; |
186 | 181 | ||
187 | default: | 182 | default: |
188 | dev_warn(&hid->dev, "ignoring unknown output " | 183 | hid_warn(hid, "ignoring unknown output usage %08x\n", |
189 | "usage %08x\n", | 184 | field->usage[0].hid); |
190 | field->usage[0].hid); | ||
191 | continue; | 185 | continue; |
192 | } | 186 | } |
193 | } | 187 | } |
194 | } | 188 | } |
195 | 189 | ||
196 | if (!tmff->report) { | 190 | if (!tmff->report) { |
197 | dev_err(&hid->dev, "can't find FF field in output reports\n"); | 191 | hid_err(hid, "can't find FF field in output reports\n"); |
198 | error = -ENODEV; | 192 | error = -ENODEV; |
199 | goto fail; | 193 | goto fail; |
200 | } | 194 | } |
@@ -203,8 +197,7 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits) | |||
203 | if (error) | 197 | if (error) |
204 | goto fail; | 198 | goto fail; |
205 | 199 | ||
206 | dev_info(&hid->dev, "force feedback for ThrustMaster devices by Zinx " | 200 | hid_info(hid, "force feedback for ThrustMaster devices by Zinx Verituse <zinx@epicsol.org>\n"); |
207 | "Verituse <zinx@epicsol.org>"); | ||
208 | return 0; | 201 | return 0; |
209 | 202 | ||
210 | fail: | 203 | fail: |
@@ -224,13 +217,13 @@ static int tm_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
224 | 217 | ||
225 | ret = hid_parse(hdev); | 218 | ret = hid_parse(hdev); |
226 | if (ret) { | 219 | if (ret) { |
227 | dev_err(&hdev->dev, "parse failed\n"); | 220 | hid_err(hdev, "parse failed\n"); |
228 | goto err; | 221 | goto err; |
229 | } | 222 | } |
230 | 223 | ||
231 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); | 224 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); |
232 | if (ret) { | 225 | if (ret) { |
233 | dev_err(&hdev->dev, "hw start failed\n"); | 226 | hid_err(hdev, "hw start failed\n"); |
234 | goto err; | 227 | goto err; |
235 | } | 228 | } |
236 | 229 | ||