]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
input: Finish simplifing key_matrix_decode_fdt()
authorStephen Warren <swarren@nvidia.com>
Thu, 6 Jun 2013 14:48:30 +0000 (10:48 -0400)
committerTom Rini <trini@ti.com>
Thu, 6 Jun 2013 14:48:30 +0000 (10:48 -0400)
[trini: Applied v1 of the series rather than v2, this commit is the
delta from v1 to v2]

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Rini <trini@ti.com>
drivers/input/key_matrix.c

index ea05c77ac7dbd12a32689f8b27248e4a0d550eb0..c900e45d150b712ecbdbfc19257cf10a136463ab 100644 (file)
@@ -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;
        }