aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/uhid.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-06-10 09:16:21 -0400
committerJiri Kosina <jkosina@suse.cz>2012-06-18 07:42:01 -0400
commitec4b7dea453e0f9fd0fbf1761b2d01eff64f264b (patch)
treebaeafe25dba78b3bd3efcb1100dd387d015a7878 /drivers/hid/uhid.c
parent037c061bca06cbfe9998476fb593090300fbbe87 (diff)
HID: uhid: add UHID_START and UHID_STOP events
We send UHID_START and UHID_STOP events to user-space when the HID core starts/stops the device. This notifies user-space about driver readiness and data-I/O can start now. This directly forwards the callbacks from hid-core to user-space. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/uhid.c')
-rw-r--r--drivers/hid/uhid.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
index 0d011db30a46..2e7f3a023975 100644
--- a/drivers/hid/uhid.c
+++ b/drivers/hid/uhid.c
@@ -82,11 +82,17 @@ static int uhid_queue_event(struct uhid_device *uhid, __u32 event)
82 82
83static int uhid_hid_start(struct hid_device *hid) 83static int uhid_hid_start(struct hid_device *hid)
84{ 84{
85 return 0; 85 struct uhid_device *uhid = hid->driver_data;
86
87 return uhid_queue_event(uhid, UHID_START);
86} 88}
87 89
88static void uhid_hid_stop(struct hid_device *hid) 90static void uhid_hid_stop(struct hid_device *hid)
89{ 91{
92 struct uhid_device *uhid = hid->driver_data;
93
94 hid->claimed = 0;
95 uhid_queue_event(uhid, UHID_STOP);
90} 96}
91 97
92static int uhid_hid_open(struct hid_device *hid) 98static int uhid_hid_open(struct hid_device *hid)