Skip to contentSkip to conversation

input: Finish simplifing key_matrix_decode_fdt()

PATCH New Tom Rini 1 participant 2 messages Jun 6, 2013 – Jun 7, 2013 Input drivers

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 input: Finish simplifing key_matrix_decode_fdt()

From: Stephen Warren <[email protected]>

[trini: Applied v1 of the series rather than v2, this commit is the delta from v1 to v2]

---
 drivers/input/key_matrix.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/input/key_matrix.c +4 -2
index ea05c77..c900e45 100644
@@ -162,8 +162,10 @@ int key_matrix_decode_fdt(struct key_matrix *config, const void *blob, int node)
 
 	prop = fdt_get_property(blob, node, "linux,keymap", &proplen);
 	/* Basic keymap is required */
-	if (!prop)
+	if (!prop) {
+		debug("%s: cannot find keycode-plain map\n", __func__);
 		return -1;
+	}
 
 	plain_keycode = create_keymap(config, (u32 *)prop->data,
 		proplen, KEY_FN, &config->fn_pos);
@@ -180,7 +182,7 @@ int key_matrix_decode_fdt(struct key_matrix *config, const void *blob, int node)
 	config->fn_keycode = create_keymap(config, (u32 *)prop->data,
 		proplen, -1, NULL);
 	/* Conversion error -> fail */
-	if (!config->plain_keycode) {
+	if (!config->fn_keycode) {
 		free(plain_keycode);
 		return -1;
 	}
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/1 input: Finish simplifing key_matrix_decode_fdt()

Quoted 7 lines · Tom Rini

From: Stephen Warren <[email protected]>

[trini: Applied v1 of the series rather than v2, this commit is the delta from v1 to v2]

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130607/32e1d7b4/attachment.pgp>