]> err.no Git - linux-2.6/blobdiff - drivers/char/keyboard.c
Merge branch 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm
[linux-2.6] / drivers / char / keyboard.c
index d54f4a3ae340ddb93e82b6aa98828eb1d6f7cc58..4dbd3425e928ed563ff4954378147692deff7b94 100644 (file)
@@ -38,7 +38,6 @@
 #include <linux/kbd_kern.h>
 #include <linux/kbd_diacr.h>
 #include <linux/vt_kern.h>
-#include <linux/consolemap.h>
 #include <linux/sysrq.h>
 #include <linux/input.h>
 #include <linux/reboot.h>
@@ -129,7 +128,7 @@ int shift_state = 0;
  */
 
 static struct input_handler kbd_handler;
-static unsigned long key_down[NBITS(KEY_MAX)];         /* keyboard key bitmap */
+static unsigned long key_down[BITS_TO_LONGS(KEY_CNT)]; /* keyboard key bitmap */
 static unsigned char shift_down[NR_SHIFT];             /* shift state counters.. */
 static int dead_key_next;
 static int npadch = -1;                                        /* -1 or number assembled on pad */
@@ -194,7 +193,7 @@ int getkeycode(unsigned int scancode)
        int error = -ENODEV;
 
        list_for_each_entry(handle, &kbd_handler.h_list, h_node) {
-               error = handle->dev->getkeycode(handle->dev, scancode, &keycode);
+               error = input_get_keycode(handle->dev, scancode, &keycode);
                if (!error)
                        return keycode;
        }
@@ -208,7 +207,7 @@ int setkeycode(unsigned int scancode, unsigned int keycode)
        int error = -ENODEV;
 
        list_for_each_entry(handle, &kbd_handler.h_list, h_node) {
-               error = handle->dev->setkeycode(handle->dev, scancode, keycode);
+               error = input_set_keycode(handle->dev, scancode, keycode);
                if (!error)
                        break;
        }
@@ -1377,12 +1376,12 @@ static void kbd_start(struct input_handle *handle)
 static const struct input_device_id kbd_ids[] = {
        {
                 .flags = INPUT_DEVICE_ID_MATCH_EVBIT,
-                .evbit = { BIT(EV_KEY) },
+                .evbit = { BIT_MASK(EV_KEY) },
         },
 
        {
                 .flags = INPUT_DEVICE_ID_MATCH_EVBIT,
-                .evbit = { BIT(EV_SND) },
+                .evbit = { BIT_MASK(EV_SND) },
         },
 
        { },    /* Terminating entry */