diff mbox

[RFC,v3] serial: spi: add spi-uart driver for Maxim 3110

Message ID 20100225143940.40e21ff7@feng-i7 (mailing list archive)
State Not Applicable
Headers show

Commit Message

Feng Tang Feb. 25, 2010, 6:39 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/serial/max3110.c b/drivers/serial/max3110.c
index e8c44fa..d5bd71f 100644
--- a/drivers/serial/max3110.c
+++ b/drivers/serial/max3110.c
@@ -400,7 +400,7 @@  static int max3110_main_thread(void *_max)
 	do {
 		wait_event_interruptible(*wq,
 				max->flags || kthread_should_stop());
-		set_bit(0, &max->mthread_up);
+		test_and_set_bit(0, &max->mthread_up);
 
 		if (use_irq && test_bit(M3110_IRQ_PENDING, &max->flags)) {
 			max3110_con_receive(max);
@@ -418,7 +418,7 @@  static int max3110_main_thread(void *_max)
 			transmit_char(max);
 			clear_bit(M3110_UART_TX_NEED, &max->flags);
 		}
-		clear_bit(0, &max->mthread_up);
+		test_and_clear_bit(0, &max->mthread_up);
 	} while (!kthread_should_stop());
 
 	return ret;