Input: clean up whitespace and formatting in drivers/char/keyboard.c
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
@@ -1104,8 +1104,9 @@ static void kbd_keycode(unsigned int keycode, int down,
|
|||||||
else
|
else
|
||||||
clear_bit(keycode, key_down);
|
clear_bit(keycode, key_down);
|
||||||
|
|
||||||
if (rep && (!vc_kbd_mode(kbd, VC_REPEAT) || (tty &&
|
if (rep &&
|
||||||
(!L_ECHO(tty) && tty->driver->chars_in_buffer(tty))))) {
|
(!vc_kbd_mode(kbd, VC_REPEAT) ||
|
||||||
|
(tty && !L_ECHO(tty) && tty->driver->chars_in_buffer(tty)))) {
|
||||||
/*
|
/*
|
||||||
* Don't repeat a key if the input buffers are not empty and the
|
* Don't repeat a key if the input buffers are not empty and the
|
||||||
* characters get aren't echoed locally. This makes key repeat
|
* characters get aren't echoed locally. This makes key repeat
|
||||||
@@ -1130,7 +1131,8 @@ static void kbd_keycode(unsigned int keycode, int down,
|
|||||||
type = KTYP(keysym);
|
type = KTYP(keysym);
|
||||||
|
|
||||||
if (type < 0xf0) {
|
if (type < 0xf0) {
|
||||||
if (down && !raw_mode) to_utf8(vc, keysym);
|
if (down && !raw_mode)
|
||||||
|
to_utf8(vc, keysym);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1166,8 +1168,6 @@ static void kbd_event(struct input_handle *handle, unsigned int event_type,
|
|||||||
schedule_console_callback();
|
schedule_console_callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
static char kbd_name[] = "kbd";
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When a keyboard (or other input device) is found, the kbd_connect
|
* When a keyboard (or other input device) is found, the kbd_connect
|
||||||
* function is called. The function then looks at the device, and if it
|
* function is called. The function then looks at the device, and if it
|
||||||
@@ -1182,9 +1182,10 @@ static struct input_handle *kbd_connect(struct input_handler *handler,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = KEY_RESERVED; i < BTN_MISC; i++)
|
for (i = KEY_RESERVED; i < BTN_MISC; i++)
|
||||||
if (test_bit(i, dev->keybit)) break;
|
if (test_bit(i, dev->keybit))
|
||||||
|
break;
|
||||||
|
|
||||||
if ((i == BTN_MISC) && !test_bit(EV_SND, dev->evbit))
|
if (i == BTN_MISC && !test_bit(EV_SND, dev->evbit))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL)))
|
if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL)))
|
||||||
@@ -1193,7 +1194,7 @@ static struct input_handle *kbd_connect(struct input_handler *handler,
|
|||||||
|
|
||||||
handle->dev = dev;
|
handle->dev = dev;
|
||||||
handle->handler = handler;
|
handle->handler = handler;
|
||||||
handle->name = kbd_name;
|
handle->name = "kbd";
|
||||||
|
|
||||||
input_open_device(handle);
|
input_open_device(handle);
|
||||||
kbd_refresh_leds(handle);
|
kbd_refresh_leds(handle);
|
||||||
|
Reference in New Issue
Block a user