diff options
author | Johan Hovold <johan@kernel.org> | 2023-06-04 15:35:03 +0300 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2023-06-07 18:00:23 +0300 |
commit | 6ff58ae17fd9523246a260434133ed9ab7f56df2 (patch) | |
tree | 286bf3fdeec1bef50a64f4597deef90c55f1c82f /drivers/usb/serial/mxuport.c | |
parent | 9561de3a55bed6bdd44a12820ba81ec416e705a7 (diff) | |
download | linux-6ff58ae17fd9523246a260434133ed9ab7f56df2.tar.xz |
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>
Diffstat (limited to 'drivers/usb/serial/mxuport.c')
-rw-r--r-- | drivers/usb/serial/mxuport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c index faa0eedfe245..1f7bb3e4fcf2 100644 --- a/drivers/usb/serial/mxuport.c +++ b/drivers/usb/serial/mxuport.c @@ -1230,7 +1230,7 @@ static void mxuport_close(struct usb_serial_port *port) } /* Send a break to the port. */ -static void mxuport_break_ctl(struct tty_struct *tty, int break_state) +static int mxuport_break_ctl(struct tty_struct *tty, int break_state) { struct usb_serial_port *port = tty->driver_data; struct usb_serial *serial = port->serial; @@ -1244,8 +1244,8 @@ static void mxuport_break_ctl(struct tty_struct *tty, int break_state) dev_dbg(&port->dev, "%s - clearing break\n", __func__); } - mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_BREAK, - enable, port->port_number); + return mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_BREAK, + enable, port->port_number); } static int mxuport_resume(struct usb_serial *serial) |