]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/input/key_matrix.c
net: fec_mxc: move CONFIG_FEC_MXC_PHYADDR from Kconfig to include/configs/*.h
[karo-tx-uboot.git] / drivers / input / key_matrix.c
index ea05c77ac7dbd12a32689f8b27248e4a0d550eb0..8867e4964e6cb5b7a43c50aacd531e89208dad14 100644 (file)
@@ -4,23 +4,7 @@
  * Copyright (c) 2012 The Chromium OS Authors.
  * (C) Copyright 2004 DENX Software Engineering, Wolfgang Denk, wd@denx.de
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -162,8 +146,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 +166,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;
        }