Skip to content

Commit

Permalink
tty: sdio_uart: Fix the locking on "func" for new code
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Alan Cox authored and gregkh committed Dec 11, 2009
1 parent 4b3b49b commit 1f100b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/mmc/card/sdio_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 1f100b3

Please sign in to comment.