diff options
Diffstat (limited to 'drivers/hid/hid-tmff.c')
-rw-r--r-- | drivers/hid/hid-tmff.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/hid/hid-tmff.c b/drivers/hid/hid-tmff.c index 7c1f7b50330c..fcd6ccd02fee 100644 --- a/drivers/hid/hid-tmff.c +++ b/drivers/hid/hid-tmff.c | |||
@@ -33,11 +33,6 @@ | |||
33 | 33 | ||
34 | #include "hid-ids.h" | 34 | #include "hid-ids.h" |
35 | 35 | ||
36 | #include "usbhid/usbhid.h" | ||
37 | |||
38 | /* Usages for thrustmaster devices I know about */ | ||
39 | #define THRUSTMASTER_USAGE_FF (HID_UP_GENDESK | 0xbb) | ||
40 | |||
41 | static const signed short ff_rumble[] = { | 36 | static const signed short ff_rumble[] = { |
42 | FF_RUMBLE, | 37 | FF_RUMBLE, |
43 | -1 | 38 | -1 |
@@ -48,6 +43,12 @@ static const signed short ff_joystick[] = { | |||
48 | -1 | 43 | -1 |
49 | }; | 44 | }; |
50 | 45 | ||
46 | #ifdef CONFIG_THRUSTMASTER_FF | ||
47 | #include "usbhid/usbhid.h" | ||
48 | |||
49 | /* Usages for thrustmaster devices I know about */ | ||
50 | #define THRUSTMASTER_USAGE_FF (HID_UP_GENDESK | 0xbb) | ||
51 | |||
51 | struct tmff_device { | 52 | struct tmff_device { |
52 | struct hid_report *report; | 53 | struct hid_report *report; |
53 | struct hid_field *ff_field; | 54 | struct hid_field *ff_field; |
@@ -209,6 +210,12 @@ fail: | |||
209 | kfree(tmff); | 210 | kfree(tmff); |
210 | return error; | 211 | return error; |
211 | } | 212 | } |
213 | #else | ||
214 | static inline int tmff_init(struct hid_device *hid, const signed short *ff_bits) | ||
215 | { | ||
216 | return 0; | ||
217 | } | ||
218 | #endif | ||
212 | 219 | ||
213 | static int tm_probe(struct hid_device *hdev, const struct hid_device_id *id) | 220 | static int tm_probe(struct hid_device *hdev, const struct hid_device_id *id) |
214 | { | 221 | { |