aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/uhid.c7
-rw-r--r--include/linux/uhid.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
index 2e7f3a023975..0226ba3f5307 100644
--- a/drivers/hid/uhid.c
+++ b/drivers/hid/uhid.c
@@ -97,11 +97,16 @@ static void uhid_hid_stop(struct hid_device *hid)
97 97
98static int uhid_hid_open(struct hid_device *hid) 98static int uhid_hid_open(struct hid_device *hid)
99{ 99{
100 return 0; 100 struct uhid_device *uhid = hid->driver_data;
101
102 return uhid_queue_event(uhid, UHID_OPEN);
101} 103}
102 104
103static void uhid_hid_close(struct hid_device *hid) 105static void uhid_hid_close(struct hid_device *hid)
104{ 106{
107 struct uhid_device *uhid = hid->driver_data;
108
109 uhid_queue_event(uhid, UHID_CLOSE);
105} 110}
106 111
107static int uhid_hid_input(struct input_dev *input, unsigned int type, 112static int uhid_hid_input(struct input_dev *input, unsigned int type,
diff --git a/include/linux/uhid.h b/include/linux/uhid.h
index f8ce6f7571d8..351650b7a0f6 100644
--- a/include/linux/uhid.h
+++ b/include/linux/uhid.h
@@ -27,6 +27,8 @@ enum uhid_event_type {
27 UHID_DESTROY, 27 UHID_DESTROY,
28 UHID_START, 28 UHID_START,
29 UHID_STOP, 29 UHID_STOP,
30 UHID_OPEN,
31 UHID_CLOSE,
30 UHID_INPUT, 32 UHID_INPUT,
31}; 33};
32 34