Hi Roger,

On Wed, Sep 28, 2022 at 1:42 PM Roger Quadros <rog...@kernel.org> wrote:

> This fixes the below build error if nand.c is included in
> an SPL build.
>
> /work/u-boot/drivers/mtd/nand/raw/nand.c: In function ‘nand_init_chip’:
> /work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: error: ‘nand_chip’
> undeclared (first use in this function)
>    82 |  struct nand_chip *nand = &nand_chip[i];
>       |                            ^~~~~~~~~
> /work/u-boot/drivers/mtd/nand/raw/nand.c:82:28: note: each undeclared
> identifier is reported only once for each function it appears in
> /work/u-boot/drivers/mtd/nand/raw/nand.c:84:20: error: ‘base_address’
> undeclared (first use in this function); did you mean ‘base_addr’?
>    84 |  ulong base_addr = base_address[i];
>       |                    ^~~~~~~~~~~~
>       |                    base_addr
>
> Fixes: 068c41f1cc77 ("Finish conversion CONFIG_SYS_NAND_SELF_INIT to
> Kconfig")
> Signed-off-by: Roger Quadros <rog...@kernel.org>
> ---
>  drivers/mtd/nand/raw/nand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/nand.c b/drivers/mtd/nand/raw/nand.c
> index 4b5560dd24..14bca12024 100644
> --- a/drivers/mtd/nand/raw/nand.c
> +++ b/drivers/mtd/nand/raw/nand.c
> @@ -19,7 +19,7 @@ int nand_curr_device = -1;
>
>  static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE];
>
> -#ifndef CONFIG_SYS_NAND_SELF_INIT
> +#if !CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
>  static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE];
>  static ulong base_address[CONFIG_SYS_MAX_NAND_DEVICE] =
> CONFIG_SYS_NAND_BASE_LIST;
>  #endif
> --
> 2.17.1
>
> Applied to nand-next, thanks!

Dario

-- 

*Dario Binacchi*

Embedded Linux Developer

dario.binac...@amarulasolutions.com

__________________________________


*Amarula Solutions SRL*

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
i...@amarulasolutions.com

www.amarulasolutions.com

Reply via email to