diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-11-24 16:20:09 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2009-01-04 01:00:52 +0100 |
commit | 3a6f82f7a22cf19687f556997c6978b31c109360 (patch) | |
tree | 0b3a34f0c2035beb21c6d15af33207d3057bcdaf /include/linux | |
parent | 898089d08f983ef0fdb176267620543a7929826a (diff) |
HID: add dynids facility
Allow adding new devices to the hid drivers on the fly without
a need of kernel recompilation.
Now, one can test a driver e.g. by:
echo 0003:045E:00F0.0003 > ../generic-usb/unbind
echo 0003 045E 00F0 > new_id
from some driver subdir.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/hid.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 2c20f20283b..215035bbb28 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -531,6 +531,8 @@ struct hid_usage_id { * @name: driver name (e.g. "Footech_bar-wheel") * @id_table: which devices is this driver for (must be non-NULL for probe * to be called) + * @dyn_list: list of dynamically added device ids + * @dyn_lock: lock protecting @dyn_list * @probe: new device inserted * @remove: device removed (NULL if not a hot-plug capable driver) * @report_table: on which reports to call raw_event (NULL means all) @@ -558,6 +560,9 @@ struct hid_driver { char *name; const struct hid_device_id *id_table; + struct list_head dyn_list; + spinlock_t dyn_lock; + int (*probe)(struct hid_device *dev, const struct hid_device_id *id); void (*remove)(struct hid_device *dev); |