aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/ctrlchar.h
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>2015-08-18 17:42:39 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-08-26 17:20:44 +0200
commitab7373bf235ede864a72f0d2f8f9a21a1748c4a2 (patch)
tree3c4f4cc4965006f31f5556bc2c4d4f3c8633e8b4 /drivers/s390/char/ctrlchar.h
parents390/numa: remove superfluous ARCH_WANT defines (diff)
downloadlinux-dev-ab7373bf235ede864a72f0d2f8f9a21a1748c4a2.tar.xz
linux-dev-ab7373bf235ede864a72f0d2f8f9a21a1748c4a2.zip
s390/ctrlchar: improve handling of magic sysrequests
Extract the sysrq handling from the ctrlchar_handle() into a separate function that can be directly used by other users. Introduce a new sysrq_work structure to embed the work_struct and to specify the magic sysrq function to be invoked. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to '')
-rw-r--r--drivers/s390/char/ctrlchar.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/s390/char/ctrlchar.h b/drivers/s390/char/ctrlchar.h
index 1a53552f4981..59c2d6e55e55 100644
--- a/drivers/s390/char/ctrlchar.h
+++ b/drivers/s390/char/ctrlchar.h
@@ -7,6 +7,8 @@
*/
#include <linux/tty.h>
+#include <linux/sysrq.h>
+#include <linux/workqueue.h>
extern unsigned int
ctrlchar_handle(const unsigned char *buf, int len, struct tty_struct *tty);
@@ -17,3 +19,13 @@ ctrlchar_handle(const unsigned char *buf, int len, struct tty_struct *tty);
#define CTRLCHAR_SYSRQ (3 << 8)
#define CTRLCHAR_MASK (~0xffu)
+
+
+#ifdef CONFIG_MAGIC_SYSRQ
+struct sysrq_work {
+ int key;
+ struct work_struct work;
+};
+
+void schedule_sysrq_work(struct sysrq_work *sw);
+#endif