aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-10-08 12:07:24 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-10-08 12:37:55 -0400
commit7f8d4cad1e4e11a45d02bd6e024cc2812963c38a (patch)
treeac592d99a390f1aecf9944e10d05abe4ec0f1b76 /include/linux
parent0124be49770469cfb258d7df4693e70b4c5fb013 (diff)
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')
-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;
1396 * @start: starts handler for given handle. This function is called by 1396 * @start: starts handler for given handle. This function is called by
1397 * input core right after connect() method and also when a process 1397 * input core right after connect() method and also when a process
1398 * that "grabbed" a device releases it 1398 * that "grabbed" a device releases it
1399 * @fops: file operations this driver implements 1399 * @legacy_minors: set to %true by drivers using legacy minor ranges
1400 * @minor: beginning of range of 32 minors for devices this driver 1400 * @minor: beginning of range of 32 legacy minors for devices this driver
1401 * can provide 1401 * can provide
1402 * @name: name of the handler, to be shown in /proc/bus/input/handlers 1402 * @name: name of the handler, to be shown in /proc/bus/input/handlers
1403 * @id_table: pointer to a table of input_device_ids this driver can 1403 * @id_table: pointer to a table of input_device_ids this driver can
@@ -1431,7 +1431,7 @@ struct input_handler {
1431 void (*disconnect)(struct input_handle *handle); 1431 void (*disconnect)(struct input_handle *handle);
1432 void (*start)(struct input_handle *handle); 1432 void (*start)(struct input_handle *handle);
1433 1433
1434 const struct file_operations *fops; 1434 bool legacy_minors;
1435 int minor; 1435 int minor;
1436 const char *name; 1436 const char *name;
1437 1437
@@ -1499,6 +1499,10 @@ void input_reset_device(struct input_dev *);
1499int __must_check input_register_handler(struct input_handler *); 1499int __must_check input_register_handler(struct input_handler *);
1500void input_unregister_handler(struct input_handler *); 1500void input_unregister_handler(struct input_handler *);
1501 1501
1502int __must_check input_get_new_minor(int legacy_base, unsigned int legacy_num,
1503 bool allow_dynamic);
1504void input_free_minor(unsigned int minor);
1505
1502int input_handler_for_each_handle(struct input_handler *, void *data, 1506int input_handler_for_each_handle(struct input_handler *, void *data,
1503 int (*fn)(struct input_handle *, void *)); 1507 int (*fn)(struct input_handle *, void *));
1504 1508