aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2020-07-08 14:49:57 +0200
committerJohan Hovold <johan@kernel.org>2020-07-09 09:20:10 +0200
commit4b5cf2b8f90faf32bbb735b545510edefce094be (patch)
treedfa1cc3cf803faab3c76096b79e59d2ecf3e2a23 /include/linux/usb
parentUSB: serial: inline sysrq dummy function (diff)
downloadlinux-dev-4b5cf2b8f90faf32bbb735b545510edefce094be.tar.xz
linux-dev-4b5cf2b8f90faf32bbb735b545510edefce094be.zip
USB: serial: add sysrq break-handler dummy
Add inline sysrq break-handler dummy to allow the compiler to eliminate further code when either console or sysrq support isn't enabled and to clearly mark the two sysrq functions as belonging together. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/serial.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index be73646706a9..c4ed4404335e 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -369,14 +369,18 @@ extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port,
#if defined(CONFIG_USB_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port,
unsigned int ch);
+extern int usb_serial_handle_break(struct usb_serial_port *port);
#else
static inline int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch)
{
return 0;
}
+static inline int usb_serial_handle_break(struct usb_serial_port *port)
+{
+ return 0;
+}
#endif
-extern int usb_serial_handle_break(struct usb_serial_port *port);
extern void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port,
struct tty_struct *tty,
unsigned int status);