aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/input.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-10-08 09:07:24 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-10-08 09:37:55 -0700
commit7f8d4cad1e4e11a45d02bd6e024cc2812963c38a (patch)
treeac592d99a390f1aecf9944e10d05abe4ec0f1b76 /include/linux/input.h
parentInput: mousedev - mark mousedev interfaces as non-seekable (diff)
downloadlinux-dev-7f8d4cad1e4e11a45d02bd6e024cc2812963c38a.tar.xz
linux-dev-7f8d4cad1e4e11a45d02bd6e024cc2812963c38a.zip
Input: extend the number of event (and other) devices
Extend the amount of character devices, such as eventX, mouseX and jsX, from a hard limit of 32 per input handler to about 1024 shared across all handlers. To be compatible with legacy installations input handlers will start creating char devices with minors in their legacy range, however once legacy range is exhausted they will start allocating minors from the dynamic range 256-1024. Reviewed-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/input.h')
-rw-r--r--include/linux/input.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index ba4874302939..15464ba6bf53 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -1396,8 +1396,8 @@ struct input_handle;
* @start: starts handler for given handle. This function is called by
* input core right after connect() method and also when a process
* that "grabbed" a device releases it
- * @fops: file operations this driver implements
- * @minor: beginning of range of 32 minors for devices this driver
+ * @legacy_minors: set to %true by drivers using legacy minor ranges
+ * @minor: beginning of range of 32 legacy minors for devices this driver
* can provide
* @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
@@ -1431,7 +1431,7 @@ struct input_handler {
void (*disconnect)(struct input_handle *handle);
void (*start)(struct input_handle *handle);
- const struct file_operations *fops;
+ bool legacy_minors;
int minor;
const char *name;
@@ -1499,6 +1499,10 @@ void input_reset_device(struct input_dev *);
int __must_check input_register_handler(struct input_handler *);
void input_unregister_handler(struct input_handler *);
+int __must_check input_get_new_minor(int legacy_base, unsigned int legacy_num,
+ bool allow_dynamic);
+void input_free_minor(unsigned int minor);
+
int input_handler_for_each_handle(struct input_handler *, void *data,
int (*fn)(struct input_handle *, void *));