X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fsysrq.h;h=98a1d8cfb73d1902d7f55466bc9aa034e8436b2b;hb=13d622b33dfbd99205a7add5751ba47445e480a6;hp=4812ff60561cb44cf66625691059dee49fce6347;hpb=d9eaec9e295a84a80b663996d0489fcff3a1dca9;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 4812ff60561..98a1d8cfb73 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h @@ -11,6 +11,8 @@ * based upon discusions in irc://irc.openprojects.net/#kernelnewbies */ +#ifndef _LINUX_SYSRQ_H +#define _LINUX_SYSRQ_H struct pt_regs; struct tty_struct; @@ -27,7 +29,7 @@ struct tty_struct; #define SYSRQ_ENABLE_RTNICE 0x0100 struct sysrq_key_op { - void (*handler)(int, struct pt_regs *, struct tty_struct *); + void (*handler)(int, struct tty_struct *); char *help_msg; char *action_msg; int enable_mask; @@ -35,25 +37,41 @@ 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, struct pt_regs *, struct tty_struct *); -void __handle_sysrq(int, struct pt_regs *, struct tty_struct *, int check_mask); -int register_sysrq_key(int, struct sysrq_key_op *); -int unregister_sysrq_key(int, struct sysrq_key_op *); +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); #else +static inline int sysrq_on(void) +{ + return 0; +} static inline int __reterr(void) { return -EINVAL; } +static inline void handle_sysrq(int key, struct tty_struct *tty) +{ +} #define register_sysrq_key(ig,nore) __reterr() #define unregister_sysrq_key(ig,nore) __reterr() #endif + +#endif /* _LINUX_SYSRQ_H */