diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/card/Kconfig | 1 | ||||
-rw-r--r-- | drivers/mmc/card/sdio_uart.c | 13 |
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/mmc/card/Kconfig b/drivers/mmc/card/Kconfig index 3b1f783bf924..5562308699bc 100644 --- a/drivers/mmc/card/Kconfig +++ b/drivers/mmc/card/Kconfig | |||
@@ -52,6 +52,7 @@ config MMC_BLOCK_BOUNCE | |||
52 | 52 | ||
53 | config SDIO_UART | 53 | config SDIO_UART |
54 | tristate "SDIO UART/GPS class support" | 54 | tristate "SDIO UART/GPS class support" |
55 | depends on TTY | ||
55 | help | 56 | help |
56 | SDIO function driver for SDIO cards that implements the UART | 57 | SDIO function driver for SDIO cards that implements the UART |
57 | class, as well as the GPS class which appears like a UART. | 58 | class, as well as the GPS class which appears like a UART. |
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index bd57a11acc79..c931dfe6a59c 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c | |||
@@ -381,7 +381,6 @@ static void sdio_uart_stop_rx(struct sdio_uart_port *port) | |||
381 | static void sdio_uart_receive_chars(struct sdio_uart_port *port, | 381 | static void sdio_uart_receive_chars(struct sdio_uart_port *port, |
382 | unsigned int *status) | 382 | unsigned int *status) |
383 | { | 383 | { |
384 | struct tty_struct *tty = tty_port_tty_get(&port->port); | ||
385 | unsigned int ch, flag; | 384 | unsigned int ch, flag; |
386 | int max_count = 256; | 385 | int max_count = 256; |
387 | 386 | ||
@@ -418,23 +417,19 @@ static void sdio_uart_receive_chars(struct sdio_uart_port *port, | |||
418 | } | 417 | } |
419 | 418 | ||
420 | if ((*status & port->ignore_status_mask & ~UART_LSR_OE) == 0) | 419 | if ((*status & port->ignore_status_mask & ~UART_LSR_OE) == 0) |
421 | if (tty) | 420 | tty_insert_flip_char(&port->port, ch, flag); |
422 | tty_insert_flip_char(tty, ch, flag); | ||
423 | 421 | ||
424 | /* | 422 | /* |
425 | * Overrun is special. Since it's reported immediately, | 423 | * Overrun is special. Since it's reported immediately, |
426 | * it doesn't affect the current character. | 424 | * it doesn't affect the current character. |
427 | */ | 425 | */ |
428 | if (*status & ~port->ignore_status_mask & UART_LSR_OE) | 426 | if (*status & ~port->ignore_status_mask & UART_LSR_OE) |
429 | if (tty) | 427 | tty_insert_flip_char(&port->port, 0, TTY_OVERRUN); |
430 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | ||
431 | 428 | ||
432 | *status = sdio_in(port, UART_LSR); | 429 | *status = sdio_in(port, UART_LSR); |
433 | } while ((*status & UART_LSR_DR) && (max_count-- > 0)); | 430 | } while ((*status & UART_LSR_DR) && (max_count-- > 0)); |
434 | if (tty) { | 431 | |
435 | tty_flip_buffer_push(tty); | 432 | tty_flip_buffer_push(&port->port); |
436 | tty_kref_put(tty); | ||
437 | } | ||
438 | } | 433 | } |
439 | 434 | ||
440 | static void sdio_uart_transmit_chars(struct sdio_uart_port *port) | 435 | static void sdio_uart_transmit_chars(struct sdio_uart_port *port) |