aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index c3448364cc73..1c8c8a5bc4a9 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1037,19 +1037,20 @@ void input_unregister_device(struct input_dev *dev)
1037} 1037}
1038EXPORT_SYMBOL(input_unregister_device); 1038EXPORT_SYMBOL(input_unregister_device);
1039 1039
1040void input_register_handler(struct input_handler *handler) 1040int input_register_handler(struct input_handler *handler)
1041{ 1041{
1042 struct input_dev *dev; 1042 struct input_dev *dev;
1043 struct input_handle *handle; 1043 struct input_handle *handle;
1044 const struct input_device_id *id; 1044 const struct input_device_id *id;
1045 1045
1046 if (!handler)
1047 return;
1048
1049 INIT_LIST_HEAD(&handler->h_list); 1046 INIT_LIST_HEAD(&handler->h_list);
1050 1047
1051 if (handler->fops != NULL) 1048 if (handler->fops != NULL) {
1049 if (input_table[handler->minor >> 5])
1050 return -EBUSY;
1051
1052 input_table[handler->minor >> 5] = handler; 1052 input_table[handler->minor >> 5] = handler;
1053 }
1053 1054
1054 list_add_tail(&handler->node, &input_handler_list); 1055 list_add_tail(&handler->node, &input_handler_list);
1055 1056
@@ -1063,6 +1064,7 @@ void input_register_handler(struct input_handler *handler)
1063 } 1064 }
1064 1065
1065 input_wakeup_procfs_readers(); 1066 input_wakeup_procfs_readers();
1067 return 0;
1066} 1068}
1067EXPORT_SYMBOL(input_register_handler); 1069EXPORT_SYMBOL(input_register_handler);
1068 1070