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 <alan@signal11.us>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Alan Ott
2011-01-18 03:04:37 -05:00
committed by Jiri Kosina
parent 581548db3b
commit 0f69dca20f
2 changed files with 23 additions and 8 deletions

View File

@@ -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)