X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fchar%2Fkeyboard.c;h=de26a978fbdd140aec88179b99c14fae555c467c;hb=24bdeb4598b9560c8ffecb8ba5cefa01f3a12a54;hp=60b934adea65139c5c802b995e6be28950cc6e2e;hpb=92794a5d6359f9e8ed0d43fe0f3c653f748dcc90;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 60b934adea6..de26a978fbd 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c @@ -46,6 +46,8 @@ extern void ctrl_alt_del(void); +#define to_handle_h(n) container_of(n, struct input_handle, h_node) + /* * Exported functions/variables */ @@ -110,6 +112,7 @@ const int max_vals[] = { const int NR_TYPES = ARRAY_SIZE(max_vals); struct kbd_struct kbd_table[MAX_NR_CONSOLES]; +EXPORT_SYMBOL_GPL(kbd_table); static struct kbd_struct *kbd = kbd_table; struct vt_spawn_console vt_spawn_con = { @@ -260,6 +263,7 @@ void kd_mksound(unsigned int hz, unsigned int ticks) } else kd_nosound(0); } +EXPORT_SYMBOL(kd_mksound); /* * Setting the keyboard rate. @@ -675,12 +679,7 @@ static void k_deadunicode(struct vc_data *vc, unsigned int value, char up_flag) static void k_self(struct vc_data *vc, unsigned char value, char up_flag) { - unsigned int uni; - if (kbd->kbdmode == VC_UNICODE) - uni = value; - else - uni = conv_8bit_to_uni(value); - k_unicode(vc, uni, up_flag); + k_unicode(vc, conv_8bit_to_uni(value), up_flag); } static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag) @@ -1230,7 +1229,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) if (rep && (!vc_kbd_mode(kbd, VC_REPEAT) || - (tty && !L_ECHO(tty) && tty->driver->chars_in_buffer(tty)))) { + (tty && !L_ECHO(tty) && tty_chars_in_buffer(tty)))) { /* * Don't repeat a key if the input buffers are not empty and the * characters get aren't echoed locally. This makes key repeat @@ -1250,7 +1249,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) return; } - if (keycode > NR_KEYS) + if (keycode >= NR_KEYS) if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8) keysym = K(KT_BRL, keycode - KEY_BRL_DOT1 + 1); else