aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/keyboard.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 14:01:58 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 14:01:58 -0400
commitcdf4f383a4b0ffbf458f65380ecffbeee1f79841 (patch)
tree8093cb3dbeda8827ca8b782f29474af523439c55 /drivers/char/keyboard.c
parent954b36d48b495afed2880320750858a2eae312c9 (diff)
parente2e8115b54aa6f159ac3dfec8d3d23b0af5fbfa0 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: Input: iforce - remove some pointless casts Input: psmouse - add support for Intellimouse 4.0 Input: atkbd - fix HANGEUL/HANJA keys Input: fix misspelling of Hangeul key Input: via-pmu - add input device support Input: rearrange exports Input: fix formatting to better follow CodingStyle Input: reset name, phys and uniq when unregistering Input: return correct size when reading modalias attribute Input: change my e-mail address in MAINTAINERS file Input: fix potential overflows in driver/input/keyboard Input: fix potential overflows in driver/input/touchscreen Input: fix potential overflows in driver/input/joystick Input: fix potential overflows in driver/input/mouse Input: fix accuracy of fixp-arith.h Input: iforce - use ENOSPC instead of ENOMEM Input: constify drivers/char/keyboard.c
Diffstat (limited to 'drivers/char/keyboard.c')
-rw-r--r--drivers/char/keyboard.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index 13e3126c1de5..4bb3d2272604 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -674,7 +674,7 @@ static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag, struc
674 */ 674 */
675static void k_dead(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs) 675static void k_dead(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs)
676{ 676{
677 static unsigned char ret_diacr[NR_DEAD] = {'`', '\'', '^', '~', '"', ',' }; 677 static const unsigned char ret_diacr[NR_DEAD] = {'`', '\'', '^', '~', '"', ',' };
678 value = ret_diacr[value]; 678 value = ret_diacr[value];
679 k_deadunicode(vc, value, up_flag, regs); 679 k_deadunicode(vc, value, up_flag, regs);
680} 680}
@@ -711,8 +711,8 @@ static void k_cur(struct vc_data *vc, unsigned char value, char up_flag, struct
711 711
712static void k_pad(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs) 712static void k_pad(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs)
713{ 713{
714 static const char *pad_chars = "0123456789+-*/\015,.?()#"; 714 static const char pad_chars[] = "0123456789+-*/\015,.?()#";
715 static const char *app_map = "pqrstuvwxylSRQMnnmPQS"; 715 static const char app_map[] = "pqrstuvwxylSRQMnnmPQS";
716 716
717 if (up_flag) 717 if (up_flag)
718 return; /* no action, if this is a key release */ 718 return; /* no action, if this is a key release */
@@ -1037,7 +1037,7 @@ static void kbd_refresh_leds(struct input_handle *handle)
1037#define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\ 1037#define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\
1038 ((dev)->id.bustype == BUS_I8042) && ((dev)->id.vendor == 0x0001) && ((dev)->id.product == 0x0001)) 1038 ((dev)->id.bustype == BUS_I8042) && ((dev)->id.vendor == 0x0001) && ((dev)->id.product == 0x0001))
1039 1039
1040static unsigned short x86_keycodes[256] = 1040static const unsigned short x86_keycodes[256] =
1041 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1041 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1042 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1042 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1043 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 1043 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
@@ -1075,11 +1075,13 @@ static int emulate_raw(struct vc_data *vc, unsigned int keycode,
1075 put_queue(vc, 0x1d | up_flag); 1075 put_queue(vc, 0x1d | up_flag);
1076 put_queue(vc, 0x45 | up_flag); 1076 put_queue(vc, 0x45 | up_flag);
1077 return 0; 1077 return 0;
1078 case KEY_HANGUEL: 1078 case KEY_HANGEUL:
1079 if (!up_flag) put_queue(vc, 0xf1); 1079 if (!up_flag)
1080 put_queue(vc, 0xf2);
1080 return 0; 1081 return 0;
1081 case KEY_HANJA: 1082 case KEY_HANJA:
1082 if (!up_flag) put_queue(vc, 0xf2); 1083 if (!up_flag)
1084 put_queue(vc, 0xf1);
1083 return 0; 1085 return 0;
1084 } 1086 }
1085 1087