Skip to content
Snippets Groups Projects
Commit 374e8370 authored by Stephen Warren's avatar Stephen Warren Committed by Tom Rini
Browse files

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: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarTom Rini <trini@ti.com>
parent 397bfd46
No related branches found
No related tags found
No related merge requests found
...@@ -162,8 +162,10 @@ int key_matrix_decode_fdt(struct key_matrix *config, const void *blob, int node) ...@@ -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); prop = fdt_get_property(blob, node, "linux,keymap", &proplen);
/* Basic keymap is required */ /* Basic keymap is required */
if (!prop) if (!prop) {
debug("%s: cannot find keycode-plain map\n", __func__);
return -1; return -1;
}
plain_keycode = create_keymap(config, (u32 *)prop->data, plain_keycode = create_keymap(config, (u32 *)prop->data,
proplen, KEY_FN, &config->fn_pos); proplen, KEY_FN, &config->fn_pos);
...@@ -180,7 +182,7 @@ int key_matrix_decode_fdt(struct key_matrix *config, const void *blob, int node) ...@@ -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, config->fn_keycode = create_keymap(config, (u32 *)prop->data,
proplen, -1, NULL); proplen, -1, NULL);
/* Conversion error -> fail */ /* Conversion error -> fail */
if (!config->plain_keycode) { if (!config->fn_keycode) {
free(plain_keycode); free(plain_keycode);
return -1; return -1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment