summaryrefslogtreecommitdiffstats
path: root/include/linux/input.h
diff options
context:
space:
mode:
authorDmitry Torokhov2010-02-03 06:08:26 +0100
committerDmitry Torokhov2010-02-04 09:25:19 +0100
commit0b7024ac4df5821347141c18e680b7166bc1cb20 (patch)
tree7a61e55e66bdd39351b3ec39ecef367588b47170 /include/linux/input.h
parentInput: usbtouchscreen - fix leaks and check return value of usb_submit_urb() (diff)
downloadkernel-qcow2-linux-0b7024ac4df5821347141c18e680b7166bc1cb20.tar.gz
kernel-qcow2-linux-0b7024ac4df5821347141c18e680b7166bc1cb20.tar.xz
kernel-qcow2-linux-0b7024ac4df5821347141c18e680b7166bc1cb20.zip
Input: add match() method to input hanlders
Get rid of blacklist in input handler structure and instead allow handlers to define their own match() method to perform fine-grained filtering of supported devices. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/input.h')
-rw-r--r--include/linux/input.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index 6c9d3d49fa91..8dc5d724c703 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -1200,6 +1200,8 @@ struct input_handle;
* it may not sleep
* @filter: similar to @event; separates normal event handlers from
* "filters".
+ * @match: called after comparing device's id with handler's id_table
+ * to perform fine-grained matching between device and handler
* @connect: called when attaching a handler to an input device
* @disconnect: disconnects a handler from input device
* @start: starts handler for given handle. This function is called by
@@ -1211,8 +1213,6 @@ struct input_handle;
* @name: name of the handler, to be shown in /proc/bus/input/handlers
* @id_table: pointer to a table of input_device_ids this driver can
* handle
- * @blacklist: pointer to a table of input_device_ids this driver should
- * ignore even if they match @id_table
* @h_list: list of input handles associated with the handler
* @node: for placing the driver onto input_handler_list
*
@@ -1235,6 +1235,7 @@ struct input_handler {
void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
+ bool (*match)(struct input_handler *handler, struct input_dev *dev);
int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
void (*disconnect)(struct input_handle *handle);
void (*start)(struct input_handle *handle);
@@ -1244,7 +1245,6 @@ struct input_handler {
const char *name;
const struct input_device_id *id_table;
- const struct input_device_id *blacklist;
struct list_head h_list;
struct list_head node;