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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -369,14 +369,18 @@ extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, · 368 unmodified lines | |||
| 369 | #if defined(CONFIG_USB_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 369 | #if defined(CONFIG_USB_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
| 370 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, | 370 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, |
| 371 | unsigned int ch); | 371 | unsigned int ch); |
| 372 | extern int usb_serial_handle_break(struct usb_serial_port *port); | ||
| 372 | #else | 373 | #else |
| 373 | static inline int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch) | 374 | static inline int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch) |
| 374 | { | 375 | { |
| 375 | return 0; | 376 | return 0; |
| 376 | } | 377 | } |
| 378 | static inline int usb_serial_handle_break(struct usb_serial_port *port) | ||
| 379 | { | ||
| 380 | return 0; | ||
| 381 | } | ||
| 377 | #endif | 382 | #endif |
| 378 | 383 | ||
| 379 | extern int usb_serial_handle_break(struct usb_serial_port *port); | ||
| 380 | extern void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port, | 384 | extern void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port, |
| 381 | struct tty_struct *tty, | 385 | struct tty_struct *tty, |
| 382 | unsigned int status); | 386 | unsigned int status); |