Skip to content

Commit bb44c30

Browse files
Kevin Hilmantmlind
authored andcommitted
ARM: OMAP2+: nand: fix build error when CONFIG_MTD_ONENAND_OMAP2=n
commit 8259573 (ARM: OMAP2+: nand: Make board_onenand_init() visible to board code) broke the build for configs with OneNAND disabled. By removing the static in the header file, it created a duplicate definition in the .c and the .h files, resuling in a build error: /work/kernel/omap/dev/arch/arm/mach-omap2/board-flash.c:102:111: error: redefinition of 'board_onenand_init' /work/kernel/omap/dev/arch/arm/mach-omap2/board-flash.h:56:51: note: previous definition of 'board_onenand_init' was here make[2]: *** [arch/arm/mach-omap2/board-flash.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [arch/arm/mach-omap2] Error 2 make: *** [sub-make] Error 2 Fix this by removing the duplicate dummy entry from the C file. Cc: Enric Balletbò i Serra <[email protected]> Cc: Javier Martinez Canillas <[email protected]> Signed-off-by: Kevin Hilman <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 6b16351 commit bb44c30

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

arch/arm/mach-omap2/board-flash.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@ __init board_onenand_init(struct mtd_partition *onenand_parts,
9797

9898
gpmc_onenand_init(&board_onenand_data);
9999
}
100-
#else
101-
void
102-
__init board_onenand_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs)
103-
{
104-
}
105100
#endif /* CONFIG_MTD_ONENAND_OMAP2 || CONFIG_MTD_ONENAND_OMAP2_MODULE */
106101

107102
#if defined(CONFIG_MTD_NAND_OMAP2) || \

0 commit comments

Comments
 (0)