git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6 and git://git.infradea...
[pandora-kernel.git]
/
net
/
bluetooth
/
rfcomm
/
core.c
diff --git
a/net/bluetooth/rfcomm/core.c
b/net/bluetooth/rfcomm/core.c
index
5759bb7
..
5ba3f6d
100644
(file)
--- a/
net/bluetooth/rfcomm/core.c
+++ b/
net/bluetooth/rfcomm/core.c
@@
-62,7
+62,6
@@
static DEFINE_MUTEX(rfcomm_mutex);
#define rfcomm_lock() mutex_lock(&rfcomm_mutex)
#define rfcomm_unlock() mutex_unlock(&rfcomm_mutex)
#define rfcomm_lock() mutex_lock(&rfcomm_mutex)
#define rfcomm_unlock() mutex_unlock(&rfcomm_mutex)
-static unsigned long rfcomm_event;
static LIST_HEAD(session_list);
static LIST_HEAD(session_list);
@@
-120,7
+119,6
@@
static inline void rfcomm_schedule(void)
{
if (!rfcomm_thread)
return;
{
if (!rfcomm_thread)
return;
- set_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event);
wake_up_process(rfcomm_thread);
}
wake_up_process(rfcomm_thread);
}
@@
-2038,19
+2036,18
@@
static int rfcomm_run(void *unused)
rfcomm_add_listener(BDADDR_ANY);
rfcomm_add_listener(BDADDR_ANY);
- while (
!kthread_should_stop()
) {
+ while (
1
) {
set_current_state(TASK_INTERRUPTIBLE);
set_current_state(TASK_INTERRUPTIBLE);
- if (!test_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event)) {
- /* No pending events. Let's sleep.
- * Incoming connections and data will wake us up. */
- schedule();
- }
- set_current_state(TASK_RUNNING);
+
+ if (kthread_should_stop())
+ break;
/* Process stuff */
/* Process stuff */
- clear_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event);
rfcomm_process_sessions();
rfcomm_process_sessions();
+
+ schedule();
}
}
+ __set_current_state(TASK_RUNNING);
rfcomm_kill_listener();
rfcomm_kill_listener();