diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2010-03-25 14:29:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:32 -0400 |
commit | 7f0ae3a8eeb7f231dc99cee7c871ba64e07ebefe (patch) | |
tree | 1a51ce3eae9193b6fbc4bdb05e4f47716442c7c4 /drivers | |
parent | 2a1e7d5d54c1c046c1fe47dffd119b45087c6de6 (diff) |
usb: fix serial build when SYSRQ is disabled
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/generic.c | 9 |
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 | ||
561 | int usb_serial_handle_sysrq_char(struct tty_struct *tty, | 563 | int 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 | ||
577 | int 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 | ||
574 | EXPORT_SYMBOL_GPL(usb_serial_handle_sysrq_char); | 583 | EXPORT_SYMBOL_GPL(usb_serial_handle_sysrq_char); |
575 | 584 | ||
576 | int usb_serial_handle_break(struct usb_serial_port *port) | 585 | int usb_serial_handle_break(struct usb_serial_port *port) |