summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mxuport.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2023-06-04 14:35:03 +0200
committerJohan Hovold <johan@kernel.org>2023-06-07 17:00:23 +0200
commit6ff58ae17fd9523246a260434133ed9ab7f56df2 (patch)
tree286bf3fdeec1bef50a64f4597deef90c55f1c82f /drivers/usb/serial/mxuport.c
parentLinux 6.4-rc5 (diff)
downloadlinux-6ff58ae17fd9523246a260434133ed9ab7f56df2.tar.xz
linux-6ff58ae17fd9523246a260434133ed9ab7f56df2.zip
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.c6
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)