From 0f69dca20f77dc374b67e17e10b30cec37e778c4 Mon Sep 17 00:00:00 2001 From: Alan Ott Date: Tue, 18 Jan 2011 03:04:37 -0500 Subject: HID: bt: Move hid_add_device() call to after hidp_session() has started. Move the call to hid_add_device() (which calls a device's probe() function) to after the kernel_thread() call which starts the hidp_session() thread. This ensures the Bluetooth receive socket is fully running by the time a device's probe() function is called. This way, a device can communicate (send and receive) with the Bluetooth device from its probe() function. Signed-off-by: Alan Ott Acked-by: Gustavo F. Padovan Signed-off-by: Jiri Kosina --- net/bluetooth/hidp/hidp.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/bluetooth/hidp/hidp.h') diff --git a/net/bluetooth/hidp/hidp.h b/net/bluetooth/hidp/hidp.h index 8d934a19da0a..2cc35dc8fa03 100644 --- a/net/bluetooth/hidp/hidp.h +++ b/net/bluetooth/hidp/hidp.h @@ -157,6 +157,9 @@ struct hidp_session { /* Report descriptor */ __u8 *rd_data; uint rd_size; + + wait_queue_head_t startup_queue; + int waiting_for_startup; }; static inline void hidp_schedule(struct hidp_session *session) -- cgit v1.2.2