X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Finput%2Ftegra-kbc.c;h=70429b94a49c6c866afb2b0b3997301dbe250ccb;hb=069b746ad9e66ab75973020f992e059c06cf3a7c;hp=c77f6107696281f89c85986efcd95d62b4a37f41;hpb=20680b560a17fb29c862de77930cfbf76b24f83c;p=u-boot diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c index c77f610769..70429b94a4 100644 --- a/drivers/input/tegra-kbc.c +++ b/drivers/input/tegra-kbc.c @@ -1,8 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2011 * NVIDIA Corporation - * - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -19,8 +18,6 @@ #include #include -DECLARE_GLOBAL_DATA_PTR; - enum { KBC_MAX_GPIO = 24, KBC_MAX_KPENT = 8, /* size of keypress entry queue */ @@ -290,10 +287,9 @@ static int tegra_kbd_probe(struct udevice *dev) struct keyboard_priv *uc_priv = dev_get_uclass_priv(dev); struct stdio_dev *sdev = &uc_priv->sdev; struct input_config *input = &uc_priv->input; - int node = dev->of_offset; int ret; - priv->kbc = (struct kbc_tegra *)dev_get_addr(dev); + priv->kbc = (struct kbc_tegra *)devfdt_get_addr(dev); if ((fdt_addr_t)priv->kbc == FDT_ADDR_T_NONE) { debug("%s: No keyboard register found\n", __func__); return -EINVAL; @@ -306,7 +302,7 @@ static int tegra_kbd_probe(struct udevice *dev) debug("%s: Could not init key matrix: %d\n", __func__, ret); return ret; } - ret = key_matrix_decode_fdt(&priv->matrix, gd->fdt_blob, node); + ret = key_matrix_decode_fdt(dev, &priv->matrix); if (ret) { debug("%s: Could not decode key matrix from fdt: %d\n", __func__, ret);