diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-06-06 14:48:30 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-06-06 14:48:30 (GMT) |
commit | 374e837069bb5570266dcb41607dc983269702d7 (patch) | |
tree | 79f07bb212e0239bf616c7786dd0a410e5ac21bd /drivers/input/key_matrix.c | |
parent | 397bfd4642c12fb1c83a24376e03316523581c44 (diff) | |
download | u-boot-fsl-qoriq-374e837069bb5570266dcb41607dc983269702d7.tar.xz |
input: Finish simplifing key_matrix_decode_fdt()
[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>
Diffstat (limited to 'drivers/input/key_matrix.c')
-rw-r--r-- | drivers/input/key_matrix.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/key_matrix.c b/drivers/input/key_matrix.c index ea05c77..c900e45 100644 --- a/drivers/input/key_matrix.c +++ b/drivers/input/key_matrix.c @@ -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; } |