sdio_uart: Fix SDIO break control to now return success or an error
This is a consequence of patch 9ea761bfef52c116fed4715d4043392c2503fe6a. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
parent
6a36913a33
commit
c43d863697
|
@ -885,12 +885,14 @@ static void sdio_uart_set_termios(struct tty_struct *tty, struct ktermios *old_t
|
||||||
sdio_uart_release_func(port);
|
sdio_uart_release_func(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sdio_uart_break_ctl(struct tty_struct *tty, int break_state)
|
static int sdio_uart_break_ctl(struct tty_struct *tty, int break_state)
|
||||||
{
|
{
|
||||||
struct sdio_uart_port *port = tty->driver_data;
|
struct sdio_uart_port *port = tty->driver_data;
|
||||||
|
int result;
|
||||||
|
|
||||||
if (sdio_uart_claim_func(port) != 0)
|
result = sdio_uart_claim_func(port);
|
||||||
return;
|
if (result != 0)
|
||||||
|
return result;
|
||||||
|
|
||||||
if (break_state == -1)
|
if (break_state == -1)
|
||||||
port->lcr |= UART_LCR_SBC;
|
port->lcr |= UART_LCR_SBC;
|
||||||
|
@ -899,6 +901,7 @@ static void sdio_uart_break_ctl(struct tty_struct *tty, int break_state)
|
||||||
sdio_out(port, UART_LCR, port->lcr);
|
sdio_out(port, UART_LCR, port->lcr);
|
||||||
|
|
||||||
sdio_uart_release_func(port);
|
sdio_uart_release_func(port);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sdio_uart_tiocmget(struct tty_struct *tty, struct file *file)
|
static int sdio_uart_tiocmget(struct tty_struct *tty, struct file *file)
|
||||||
|
|
Loading…
Reference in New Issue