aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-gaff.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2009-05-15 09:46:44 -0400
committerJiri Kosina <jkosina@suse.cz>2009-05-15 09:51:36 -0400
commit0f6f4319a72a2b32d19643ff811f25633d8b0207 (patch)
treec9b482414ff2d974736a7e829d22aaf50b94d82b /drivers/hid/hid-gaff.c
parentfac733f029251a393c42a8313432f2d9fe43bb83 (diff)
HID: fix hid-ff drivers so that devices work even without ff support
Currently, the hid-*ff force feedback drivers, which claim the blacklisted device on a HID bus, are only compiled in if the user selects force feedback support. However we want the device to be supported even when the kernel is configured without force feedback. This patch fixes the drivers in a way that they get compiled even if force feedback is turned off; all the force feedback support code is compiled out in such case, and the driver works as a usual driver on HID bus, claiming and initializing the device, making it operational without FF effects. Reported-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-gaff.c')
-rw-r--r--drivers/hid/hid-gaff.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hid/hid-gaff.c b/drivers/hid/hid-gaff.c
index 510ad3ab8d33..8a11ccddaf2e 100644
--- a/drivers/hid/hid-gaff.c
+++ b/drivers/hid/hid-gaff.c
@@ -31,6 +31,8 @@
31#include <linux/usb.h> 31#include <linux/usb.h>
32#include <linux/hid.h> 32#include <linux/hid.h>
33#include "hid-ids.h" 33#include "hid-ids.h"
34
35#ifdef CONFIG_GREENASIA_FF
34#include "usbhid/usbhid.h" 36#include "usbhid/usbhid.h"
35 37
36struct gaff_device { 38struct gaff_device {
@@ -130,6 +132,12 @@ static int gaff_init(struct hid_device *hid)
130 132
131 return 0; 133 return 0;
132} 134}
135#else
136static inline int gaff_init(struct hid_device *hdev)
137{
138 return 0;
139}
140#endif
133 141
134static int ga_probe(struct hid_device *hdev, const struct hid_device_id *id) 142static int ga_probe(struct hid_device *hdev, const struct hid_device_id *id)
135{ 143{