USB: serial: return errors from break handling

Start propagating errors to user space when setting the break state
fails.

This will be used by follow-on changes to also report when a driver or
device does not support break control.

Tested-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
Johan Hovold
2023-06-04 14:35:03 +02:00
parent 9561de3a55
commit 6ff58ae17f
25 changed files with 140 additions and 72 deletions

View File

@@ -656,7 +656,7 @@ out_unlock:
return status;
}
static void f81534_break_ctl(struct tty_struct *tty, int break_state)
static int f81534_break_ctl(struct tty_struct *tty, int break_state)
{
struct usb_serial_port *port = tty->driver_data;
struct f81534_port_private *port_priv = usb_get_serial_port_data(port);
@@ -675,6 +675,8 @@ static void f81534_break_ctl(struct tty_struct *tty, int break_state)
dev_err(&port->dev, "set break failed: %d\n", status);
mutex_unlock(&port_priv->lcr_mutex);
return status;
}
static int f81534_update_mctrl(struct usb_serial_port *port, unsigned int set,