diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-11-24 10:20:09 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2009-01-03 19:00:52 -0500 |
commit | 3a6f82f7a22cf19687f556997c6978b31c109360 (patch) | |
tree | 0b3a34f0c2035beb21c6d15af33207d3057bcdaf /include/linux/hid.h | |
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/hid.h')
-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 2c20f20283b2..215035bbb288 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -531,6 +531,8 @@ struct hid_usage_id { | |||
531 | * @name: driver name (e.g. "Footech_bar-wheel") | 531 | * @name: driver name (e.g. "Footech_bar-wheel") |
532 | * @id_table: which devices is this driver for (must be non-NULL for probe | 532 | * @id_table: which devices is this driver for (must be non-NULL for probe |
533 | * to be called) | 533 | * to be called) |
534 | * @dyn_list: list of dynamically added device ids | ||
535 | * @dyn_lock: lock protecting @dyn_list | ||
534 | * @probe: new device inserted | 536 | * @probe: new device inserted |
535 | * @remove: device removed (NULL if not a hot-plug capable driver) | 537 | * @remove: device removed (NULL if not a hot-plug capable driver) |
536 | * @report_table: on which reports to call raw_event (NULL means all) | 538 | * @report_table: on which reports to call raw_event (NULL means all) |
@@ -558,6 +560,9 @@ struct hid_driver { | |||
558 | char *name; | 560 | char *name; |
559 | const struct hid_device_id *id_table; | 561 | const struct hid_device_id *id_table; |
560 | 562 | ||
563 | struct list_head dyn_list; | ||
564 | spinlock_t dyn_lock; | ||
565 | |||
561 | int (*probe)(struct hid_device *dev, const struct hid_device_id *id); | 566 | int (*probe)(struct hid_device *dev, const struct hid_device_id *id); |
562 | void (*remove)(struct hid_device *dev); | 567 | void (*remove)(struct hid_device *dev); |
563 | 568 | ||