summaryrefslogtreecommitdiff
path: root/include/linux/sysrq.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-03-22 08:31:26 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-04-14 10:26:02 +0400
commit97f5f0cd8cd0a05449cbb77d1e6f02e026875802 (patch)
treee101f38dfd7bf4e759e96617f69ceedd497608e3 /include/linux/sysrq.h
parentb91c4be730668e801aa6a2ea95f467cd9a1e0983 (diff)
downloadlinux-97f5f0cd8cd0a05449cbb77d1e6f02e026875802.tar.xz
Input: implement SysRq as a separate input handler
Instead of keeping SysRq support inside of legacy keyboard driver split it out into a separate input handler (filter). This stops most SysRq input events from leaking into evdev clients (some events, such as first SysRq scancode - not keycode - event, are still leaked into both legacy keyboard and evdev). [martinez.javier@gmail.com: fix compile error when CONFIG_MAGIC_SYSRQ is not defined] Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/sysrq.h')
-rw-r--r--include/linux/sysrq.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h
index 99adcdc0d3ca..4496322e28dd 100644
--- a/include/linux/sysrq.h
+++ b/include/linux/sysrq.h
@@ -39,41 +39,34 @@ struct sysrq_key_op {
#ifdef CONFIG_MAGIC_SYSRQ
-extern int sysrq_on(void);
-
-/*
- * Do not use this one directly:
- */
-extern int __sysrq_enabled;
-
/* Generic SysRq interface -- you may call it from any device driver, supplying
* ASCII code of the key, pointer to registers and kbd/tty structs (if they
* are available -- else NULL's).
*/
void handle_sysrq(int key, struct tty_struct *tty);
-void __handle_sysrq(int key, struct tty_struct *tty, int check_mask);
int register_sysrq_key(int key, struct sysrq_key_op *op);
int unregister_sysrq_key(int key, struct sysrq_key_op *op);
struct sysrq_key_op *__sysrq_get_key_op(int key);
+int sysrq_toggle_support(int enable_mask);
+
#else
-static inline int sysrq_on(void)
+static inline void handle_sysrq(int key, struct tty_struct *tty)
{
- return 0;
}
-static inline int __reterr(void)
+
+static inline int register_sysrq_key(int key, struct sysrq_key_op *op)
{
return -EINVAL;
}
-static inline void handle_sysrq(int key, struct tty_struct *tty)
+
+static inline int unregister_sysrq_key(int key, struct sysrq_key_op *op)
{
+ return -EINVAL;
}
-#define register_sysrq_key(ig,nore) __reterr()
-#define unregister_sysrq_key(ig,nore) __reterr()
-
#endif
#endif /* _LINUX_SYSRQ_H */