diff options
author | Alan Cox <alan@linux.intel.com> | 2009-11-30 16:16:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-12 02:18:06 +0300 |
commit | 1f100b323d19469b06a63ccd6130ed71760145cc (patch) | |
tree | de475d8906cefed5e8146ad82403e52ed9399a76 /drivers/mmc/card/sdio_uart.c | |
parent | 4b3b49bb77eddb540e7c69e2129f5334cf713bf8 (diff) | |
download | linux-1f100b323d19469b06a63ccd6130ed71760145cc.tar.xz |
tty: sdio_uart: Fix the locking on "func" for new code
The new dtr_rts function didn't take the port->func lock as it should
so add use of the lock there.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/mmc/card/sdio_uart.c')
-rw-r--r-- | drivers/mmc/card/sdio_uart.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 2a13db54ffc4..f53755533e7e 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c @@ -603,10 +603,14 @@ static void uart_dtr_rts(struct tty_port *tport, int onoff) { struct sdio_uart_port *port = container_of(tport, struct sdio_uart_port, port); + int ret = sdio_uart_claim_func(port); + if (ret) + return; if (onoff == 0) sdio_uart_clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); else sdio_uart_set_mctrl(port, TIOCM_DTR | TIOCM_RTS); + sdio_uart_release_func(port); } /** |