diff options
author | Dirk Brandewie <dirk.brandewie@gmail.com> | 2011-08-26 06:24:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-26 14:01:14 -0400 |
commit | 7b18bd52b2c63ea030364370d0d1f5cc6950aea7 (patch) | |
tree | 29809a66870ec8fb7221a0328c804214a5d983c9 /drivers/tty/serial/mrst_max3110.c | |
parent | f17141fdd407de78379222dd59d6f161437db4c8 (diff) |
max3110: wake up fixes
The main thread is waiting on on a wait_queue but wake_up_process() is
used to wake the thread. This reads weirdly. Change wake_up_process() to
wake_up().
Tested on the Moorestown tablet build
Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/serial/mrst_max3110.c')
-rw-r--r-- | drivers/tty/serial/mrst_max3110.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/tty/serial/mrst_max3110.c b/drivers/tty/serial/mrst_max3110.c index a764bf99743b..c8f986876229 100644 --- a/drivers/tty/serial/mrst_max3110.c +++ b/drivers/tty/serial/mrst_max3110.c | |||
@@ -207,7 +207,7 @@ static void serial_m3110_con_write(struct console *co, | |||
207 | uart_console_write(&pmax->port, s, count, serial_m3110_con_putchar); | 207 | uart_console_write(&pmax->port, s, count, serial_m3110_con_putchar); |
208 | 208 | ||
209 | if (!test_and_set_bit(CON_TX_NEEDED, &pmax->uart_flags)) | 209 | if (!test_and_set_bit(CON_TX_NEEDED, &pmax->uart_flags)) |
210 | wake_up_process(pmax->main_thread); | 210 | wake_up(&pmax->wq); |
211 | } | 211 | } |
212 | 212 | ||
213 | static int __init | 213 | static int __init |
@@ -301,6 +301,7 @@ static void send_circ_buf(struct uart_max3110 *max, | |||
301 | } | 301 | } |
302 | 302 | ||
303 | /* Fail to send msg to console is not very critical */ | 303 | /* Fail to send msg to console is not very critical */ |
304 | |||
304 | ret = max3110_write_then_read(max, obuf, ibuf, blen, 0); | 305 | ret = max3110_write_then_read(max, obuf, ibuf, blen, 0); |
305 | if (ret) | 306 | if (ret) |
306 | pr_warning(PR_FMT "%s(): get err msg %d\n", | 307 | pr_warning(PR_FMT "%s(): get err msg %d\n", |
@@ -349,7 +350,7 @@ static void serial_m3110_start_tx(struct uart_port *port) | |||
349 | container_of(port, struct uart_max3110, port); | 350 | container_of(port, struct uart_max3110, port); |
350 | 351 | ||
351 | if (!test_and_set_bit(UART_TX_NEEDED, &max->uart_flags)) | 352 | if (!test_and_set_bit(UART_TX_NEEDED, &max->uart_flags)) |
352 | wake_up_process(max->main_thread); | 353 | wake_up(&max->wq); |
353 | } | 354 | } |
354 | 355 | ||
355 | static void receive_chars(struct uart_max3110 *max, unsigned char *str, int len) | 356 | static void receive_chars(struct uart_max3110 *max, unsigned char *str, int len) |
@@ -424,7 +425,8 @@ static int max3110_main_thread(void *_max) | |||
424 | pr_info(PR_FMT "start main thread\n"); | 425 | pr_info(PR_FMT "start main thread\n"); |
425 | 426 | ||
426 | do { | 427 | do { |
427 | wait_event_interruptible(*wq, max->uart_flags || kthread_should_stop()); | 428 | wait_event_interruptible(*wq, |
429 | max->uart_flags || kthread_should_stop()); | ||
428 | 430 | ||
429 | mutex_lock(&max->thread_mutex); | 431 | mutex_lock(&max->thread_mutex); |
430 | 432 | ||
@@ -452,8 +454,9 @@ static irqreturn_t serial_m3110_irq(int irq, void *dev_id) | |||
452 | 454 | ||
453 | /* max3110's irq is a falling edge, not level triggered, | 455 | /* max3110's irq is a falling edge, not level triggered, |
454 | * so no need to disable the irq */ | 456 | * so no need to disable the irq */ |
457 | |||
455 | if (!test_and_set_bit(BIT_IRQ_PENDING, &max->uart_flags)) | 458 | if (!test_and_set_bit(BIT_IRQ_PENDING, &max->uart_flags)) |
456 | wake_up_process(max->main_thread); | 459 | wake_up(&max->wq); |
457 | 460 | ||
458 | return IRQ_HANDLED; | 461 | return IRQ_HANDLED; |
459 | } | 462 | } |