From: Andre Guedes Date: Fri, 8 Mar 2013 14:20:13 +0000 (-0300) Subject: Bluetooth: Fix __hci_req_sync X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~65^2~170^2^2~116^2~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc4445c72cb5d1ed5af80c73e60214ab5ebd8e55;p=pandora-kernel.git Bluetooth: Fix __hci_req_sync If hci_req_run returns error, we erroneously leave the current process in TASK_INTERRUPTABLE state. If we leave the process in TASK_INTERRUPTABLE and it is preempted, this process will never be scheduled again. This patch fixes this issue by moving the preparation for scheduling (add to waitqueue and set process state) to just after the hci_req_run call. Signed-off-by: Andre Guedes Acked-by: Johan Hedberg Signed-off-by: Gustavo Padovan --- Reading git-diff-tree failed