usb: fix serial build when SYSRQ is disabled
authorRandy Dunlap <randy.dunlap@oracle.com>
Thu, 25 Mar 2010 18:29:16 +0000 (11:29 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 May 2010 20:21:32 +0000 (13:21 -0700)
Fix build error when CONFIG_MAGIC_SYSRQ is not enabled:

drivers/usb/serial/generic.c:566: error: implicit declaration of function 'handle_sysrq'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/generic.c

index ba61c745df0b1e686338b0a71777eeb04d3507d3..a5e61097668975f8209a1aeb289c29ef3bdd6753 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/slab.h>
+#include <linux/sysrq.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
 #include <linux/module.h>
@@ -558,6 +559,7 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty)
        }
 }
 
+#ifdef CONFIG_MAGIC_SYSRQ
 int usb_serial_handle_sysrq_char(struct tty_struct *tty,
                        struct usb_serial_port *port, unsigned int ch)
 {
@@ -571,6 +573,13 @@ int usb_serial_handle_sysrq_char(struct tty_struct *tty,
        }
        return 0;
 }
+#else
+int usb_serial_handle_sysrq_char(struct tty_struct *tty,
+                       struct usb_serial_port *port, unsigned int ch)
+{
+       return 0;
+}
+#endif
 EXPORT_SYMBOL_GPL(usb_serial_handle_sysrq_char);
 
 int usb_serial_handle_break(struct usb_serial_port *port)