[PATCH 5/7] nand: fix build error when BBT not enabled.

Marc Reilly marc at cpdesign.com.au
Sun Jul 29 07:28:32 EDT 2012


Hi,

> On 17:41 Sun 29 Jul     , Marc Reilly wrote:
> > This fixes following error when bad blocks config option is not enabled:
> >
> > drivers/built-in.o: In function `nand_erase_nand':
> > drivers/mtd/nand/nand_write.c:721: undefined reference to
> `nand_update_bbt'
> > drivers/built-in.o: In function `nand_default_block_markbad':
> > drivers/mtd/nand/nand_write.c:76: undefined reference to
> `nand_update_bbt'
> > make: *** [barebox] Error 1


 >  	/* Do we have a flash based bad block table ? */
> > -	if (chip->options & NAND_USE_FLASH_BBT)
> > +	if (chip->options & NAND_USE_FLASH_BBT) { #if
> > +defined(CONFIG_NAND_BBT)
> use if (IS_ENABLED())

The intention of this is to avoid referencing nand_update_bbt, I think using
IS_ENABLED() would not avoid that.

Cheers,
Marc




More information about the barebox mailing list