]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kmv tools, i8042: Use kernel status register bit names
authorPekka Enberg <penberg@kernel.org>
Thu, 2 Jun 2011 10:43:07 +0000 (13:43 +0300)
committerPekka Enberg <penberg@kernel.org>
Thu, 2 Jun 2011 11:14:30 +0000 (14:14 +0300)
This patch renames the status register bit constant names to be identical with
drivers/input/serio/i8042.h. This makes code review easier.

Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/hw/i8042.c

index d3f5d9a594e946e9fa143fde5e1977e922f8f85a..48a3c9d67475bd6bb573f0d6679545d2c81f5890 100644 (file)
 /*
  * Status register bits
  */
-#define KBD_STATUS_AUX_OBF     0x20
-#define KBD_STATUS_INH         0x10
-#define KBD_STATUS_A2          0x08
-#define KBD_STATUS_SYS         0x04
-#define KBD_STATUS_OBF         0x01
+#define I8042_STR_AUXDATA      0x20
+#define I8042_STR_KEYLOCK      0x10
+#define I8042_STR_CMDDAT       0x08
+#define I8042_STR_MUXERR       0x04
+#define I8042_STR_OBF          0x01
 
 #define KBD_MODE_KBD_INT       0x01
 #define KBD_MODE_SYS           0x02
@@ -92,16 +92,16 @@ static void kbd_update_irq(void)
        u8 mlevel = 0;
 
        /* First, clear the kbd and aux output buffer full bits */
-       state.status &= ~(KBD_STATUS_OBF | KBD_STATUS_AUX_OBF);
+       state.status &= ~(I8042_STR_OBF | I8042_STR_AUXDATA);
 
        if (state.kcount > 0) {
-               state.status |= KBD_STATUS_OBF;
+               state.status |= I8042_STR_OBF;
                klevel = 1;
        }
 
        /* Keyboard has higher priority than mouse */
        if (klevel == 0 && state.mcount != 0) {
-               state.status |= KBD_STATUS_OBF | KBD_STATUS_AUX_OBF;
+               state.status |= I8042_STR_OBF | I8042_STR_AUXDATA;
                mlevel = 1;
        }
 
@@ -281,7 +281,7 @@ static void kbd_write_data(u32 val)
 static void kbd_reset(void)
 {
        state = (struct kbd_state) {
-               .status         = KBD_STATUS_SYS | KBD_STATUS_A2 | KBD_STATUS_INH, /* 0x1c */
+               .status         = I8042_STR_MUXERR | I8042_STR_CMDDAT | I8042_STR_KEYLOCK, /* 0x1c */
                .mode           = KBD_MODE_KBD_INT | KBD_MODE_SYS, /* 0x3 */
                .mres           = AUX_DEFAULT_RESOLUTION,
                .msample        = AUX_DEFAULT_SAMPLE,