aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/generic.c
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 /drivers/usb/serial/generic.c
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 'drivers/usb/serial/generic.c')
-rw-r--r--drivers/usb/serial/generic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index a9b6d103aaf6..e60f74f11acc 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -585,11 +585,10 @@ int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch)
return 0;
}
EXPORT_SYMBOL_GPL(usb_serial_handle_sysrq_char);
-#endif
int usb_serial_handle_break(struct usb_serial_port *port)
{
- if (!port->port.console || !IS_ENABLED(CONFIG_MAGIC_SYSRQ))
+ if (!port->port.console)
return 0;
if (!port->sysrq) {
@@ -600,6 +599,7 @@ int usb_serial_handle_break(struct usb_serial_port *port)
return 0;
}
EXPORT_SYMBOL_GPL(usb_serial_handle_break);
+#endif
/**
* usb_serial_handle_dcd_change - handle a change of carrier detect state