aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/serial/generic.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index ba61c745df0b..a5e610976689 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -12,6 +12,7 @@
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/sysrq.h>
15#include <linux/tty.h> 16#include <linux/tty.h>
16#include <linux/tty_flip.h> 17#include <linux/tty_flip.h>
17#include <linux/module.h> 18#include <linux/module.h>
@@ -558,6 +559,7 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty)
558 } 559 }
559} 560}
560 561
562#ifdef CONFIG_MAGIC_SYSRQ
561int usb_serial_handle_sysrq_char(struct tty_struct *tty, 563int usb_serial_handle_sysrq_char(struct tty_struct *tty,
562 struct usb_serial_port *port, unsigned int ch) 564 struct usb_serial_port *port, unsigned int ch)
563{ 565{
@@ -571,6 +573,13 @@ int usb_serial_handle_sysrq_char(struct tty_struct *tty,
571 } 573 }
572 return 0; 574 return 0;
573} 575}
576#else
577int usb_serial_handle_sysrq_char(struct tty_struct *tty,
578 struct usb_serial_port *port, unsigned int ch)
579{
580 return 0;
581}
582#endif
574EXPORT_SYMBOL_GPL(usb_serial_handle_sysrq_char); 583EXPORT_SYMBOL_GPL(usb_serial_handle_sysrq_char);
575 584
576int usb_serial_handle_break(struct usb_serial_port *port) 585int usb_serial_handle_break(struct usb_serial_port *port)