rk_sysrq: fix for v2.6.36
author黄涛 <huangtao@rock-chips.com>
Mon, 1 Aug 2011 03:20:53 +0000 (11:20 +0800)
committer黄涛 <huangtao@rock-chips.com>
Mon, 1 Aug 2011 03:20:53 +0000 (11:20 +0800)
drivers/char/rk_sysrq.c

index af093355588157fd927b10339a56ea67f4abe039..eb741935f57cdfa48655c0e130056cdfd7a2ff08 100755 (executable)
@@ -38,6 +38,7 @@
 #include <linux/workqueue.h>
 #include <linux/hrtimer.h>
 #include <linux/oom.h>
+#include <linux/version.h>
 
 #include <asm/ptrace.h>
 #include <asm/irq_regs.h>
@@ -744,7 +745,11 @@ void __rk_handle_sysrq(int key, struct tty_struct *tty, int check_mask)
                if (!check_mask || rk_sysrq_on_mask(op_p->enable_mask)) {
                        printk("%s\n", op_p->action_msg);
                        console_loglevel = orig_log_level;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36))
+                       op_p->handler(key);
+#else
                        op_p->handler(key, tty);
+#endif
                } else {
                        printk("This sysrq operation is disabled.\n");
                }