Skip to contentSkip to conversation

pxa27x: Reduce size of keyboard matrix mapping

PATCH Applied Stefan Weil 3 participants 3 messages Dec 22, 2013 – Dec 23, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pxa27x: Reduce size of keyboard matrix mapping

The row and column values use only a very limited range (-1 ... 7), so a byte value is sufficient.

---
 include/hw/arm/pxa.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/hw/arm/pxa.h +2 -2
index d146c58..7ca330a 100644
@@ -102,8 +102,8 @@ void pxa2xx_pcmcia_set_irq_cb(void *opaque, qemu_irq irq, qemu_irq cd_irq);
 
 /* pxa2xx_keypad.c */
 struct  keymap {
-    int column;
-    int row;
+    int8_t column;
+    int8_t row;
 };
 typedef struct PXA2xxKeyPadState PXA2xxKeyPadState;
 PXA2xxKeyPadState *pxa27x_keypad_init(MemoryRegion *sysmem,
Signature · 1 line
1.7.10.4
#2 lore raw
In reply to Stefan Weil
Quoted 2 lines · Stefan Weil

The row and column values use only a very limited range (-1 ... 7), so a byte value is sufficient.

Thanks, applied to the trivial-patches queue.

/mjt