sg3-utils: add newer buildable version
[openembedded.git] / recipes / linux / openzaurus-pxa-2.4.18-rmk7-pxa3-embedix20031107 / enable-sysrq.patch
1
2 #
3 # Patch managed by http://www.holgerschurig.de/patcher.html
4 #
5
6 --- linux/drivers/char/corgi_keyb.c~enable-sysrq
7 +++ linux/drivers/char/corgi_keyb.c
8 @@ -23,7 +23,7 @@
9  #include <linux/init.h>
10  #include <linux/poll.h>
11  #include <linux/wait.h>
12 -#include <asm/arch/keyboard.h>
13 +#include <asm/keyboard.h>
14  #include <asm/uaccess.h>
15  #include <linux/tqueue.h>
16  #include <linux/kbd_ll.h>
17 @@ -46,6 +46,18 @@
18  #endif
19  
20  /*
21 + * This is the KeyCode [not ScanCode!] to ASCII Code mapping table
22 + */
23 +
24 +#ifdef CONFIG_MAGIC_SYSRQ
25 +static unsigned char corgi_sysrq_xlate[128] =
26 +       "\000abcdefghijklmno"                                           /* 00-0f */
27 +       "pqrstuvwxyz\000\000\000\000\000"                               /* 10-1f */
28 +       " \000\000\000\000\000\000\000\0001234567"                      /* 20-2f */
29 +       "890\000\000\000\000\000\000\000\000\000\000\000\000\000";      /* 30-3f */
30 +#endif
31 +
32 +/*
33   * common logical driver definition
34   */
35  extern void sharppda_kbd_press(int keycode);
36 @@ -251,7 +263,13 @@
37         corgi_wakeup_button_init();
38  #endif // USE_WAKEUP_BUTTON
39  
40 -       printk("keyboard initilaized.\n");
41 +       printk("keyboard initialized.\n");
42 +#ifdef CONFIG_MAGIC_SYSRQ
43 +       k_sysrq_key = 0x28; // KEY_HOME
44 +       k_sysrq_xlate = corgi_sysrq_xlate;
45 +       printk("magic_sysrq initialized.\n");
46 +#endif
47 +
48  }
49  
50  int corgi_kbd_translate(unsigned char scancode, unsigned char *keycode_p)
51 --- linux/drivers/char/keyboard.c~enable-sysrq
52 +++ linux/drivers/char/keyboard.c
53 @@ -366,7 +366,7 @@
54  #ifdef CONFIG_MAGIC_SYSRQ              /* Handle the SysRq Hack */
55         if (keycode == SYSRQ_KEY) {
56                 sysrq_pressed = !up_flag;
57 -               goto out;
58 +               // goto out;
59         } else if (sysrq_pressed) {
60                 if (!up_flag) {
61                         handle_sysrq(kbd_sysrq_xlate[keycode], kbd_pt_regs, kbd, tty);