diff options
author | Jiri Kosina <jkosina@suse.cz> | 2012-03-09 07:55:43 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-03-09 07:55:43 -0500 |
commit | 6b1968d5b6e223237bca98879f31c5616b3b325f (patch) | |
tree | 6bcd1e6e9ba89ef46cfbef2501590bb7b86d2e07 /drivers/hid/hid-core.c | |
parent | a786e83cb088f1afcd1d55e44efd4b89d78c32d1 (diff) |
HID: make it possible to force hid-core claim the device
Introduce 'hid_ignore_special_drivers' module parameter that makes hid-core
claim the device even if it's listed in hid_have_special_driver[]. This
is useful mostly for debugging purposes and specialized initrds, where
all the hid drivers are not avaiable.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r-- | drivers/hid/hid-core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index d76d85a41629..fbecdd3e7cd3 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Copyright (c) 1999 Andreas Gal | 4 | * Copyright (c) 1999 Andreas Gal |
5 | * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz> | 5 | * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz> |
6 | * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc | 6 | * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc |
7 | * Copyright (c) 2006-2010 Jiri Kosina | 7 | * Copyright (c) 2006-2012 Jiri Kosina |
8 | */ | 8 | */ |
9 | 9 | ||
10 | /* | 10 | /* |
@@ -50,6 +50,10 @@ module_param_named(debug, hid_debug, int, 0600); | |||
50 | MODULE_PARM_DESC(debug, "toggle HID debugging messages"); | 50 | MODULE_PARM_DESC(debug, "toggle HID debugging messages"); |
51 | EXPORT_SYMBOL_GPL(hid_debug); | 51 | EXPORT_SYMBOL_GPL(hid_debug); |
52 | 52 | ||
53 | static int hid_ignore_special_drivers = 0; | ||
54 | module_param_named(ignore_special_drivers, hid_ignore_special_drivers, int, 0600); | ||
55 | MODULE_PARM_DESC(debug, "Ignore any special drivers and handle all devices by generic driver"); | ||
56 | |||
53 | /* | 57 | /* |
54 | * Register a new report for a device. | 58 | * Register a new report for a device. |
55 | */ | 59 | */ |
@@ -1678,7 +1682,7 @@ static int hid_bus_match(struct device *dev, struct device_driver *drv) | |||
1678 | return 0; | 1682 | return 0; |
1679 | 1683 | ||
1680 | /* generic wants all that don't have specialized driver */ | 1684 | /* generic wants all that don't have specialized driver */ |
1681 | if (!strncmp(hdrv->name, "generic-", 8)) | 1685 | if (!strncmp(hdrv->name, "generic-", 8) && !hid_ignore_special_drivers) |
1682 | return !hid_match_id(hdev, hid_have_special_driver); | 1686 | return !hid_match_id(hdev, hid_have_special_driver); |
1683 | 1687 | ||
1684 | return 1; | 1688 | return 1; |