Skip to content

Commit

Permalink
usb: fix serial build when SYSRQ is disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Randy Dunlap authored and Greg Kroah-Hartman committed May 20, 2010
1 parent 2a1e7d5 commit 7f0ae3a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/usb/serial/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down

0 comments on commit 7f0ae3a

Please sign in to comment.