diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 15:08:05 +0200 | 
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 15:08:18 +0200 | 
| commit | e060c38434b2caa78efe7cedaff4191040b65a15 (patch) | |
| tree | 407361230bf6733f63d8e788e4b5e6566ee04818 /net/bluetooth/rfcomm/core.c | |
| parent | 10e4ac572eeffe5317019bd7330b6058a400dfc2 (diff) | |
| parent | cc39c6a9bbdebfcf1a7dee64d83bf302bc38d941 (diff) | |
| download | olio-linux-3.10-e060c38434b2caa78efe7cedaff4191040b65a15.tar.xz olio-linux-3.10-e060c38434b2caa78efe7cedaff4191040b65a15.zip  | |
Merge branch 'master' into for-next
Fast-forward merge with Linus to be able to merge patches
based on more recent version of the tree.
Diffstat (limited to 'net/bluetooth/rfcomm/core.c')
| -rw-r--r-- | net/bluetooth/rfcomm/core.c | 17 | 
1 files changed, 7 insertions, 10 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 5759bb7054f..5ba3f6df665 100644 --- 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) -static unsigned long rfcomm_event;  static LIST_HEAD(session_list); @@ -120,7 +119,6 @@ static inline void rfcomm_schedule(void)  {  	if (!rfcomm_thread)  		return; -	set_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event);  	wake_up_process(rfcomm_thread);  } @@ -2038,19 +2036,18 @@ static int rfcomm_run(void *unused)  	rfcomm_add_listener(BDADDR_ANY); -	while (!kthread_should_stop()) { +	while (1) {  		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 */ -		clear_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event);  		rfcomm_process_sessions(); + +		schedule();  	} +	__set_current_state(TASK_RUNNING);  	rfcomm_kill_listener();  |