omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is notenabled
authorstanley.miao <stanley.miao@windriver.com>
Tue, 20 Apr 2010 06:33:26 +0000 (06:33 +0000)
committerTony Lindgren <tony@atomide.com>
Fri, 23 Apr 2010 22:35:11 +0000 (15:35 -0700)
If CONFIG_MTD_NAND_OMAP2 is not enabled, there will be a compile error,
"gpmc_nand_init() is not defined". Add a inline noop function to fix it.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/include/plat/nand.h

index 6ba88d2630d900c082938cec434c826c47720760..f8efd5466b1d07f61e08c7539e0e1e19db2f8ed4 100644 (file)
@@ -29,4 +29,11 @@ struct omap_nand_platform_data {
 /* size (4 KiB) for IO mapping */
 #define        NAND_IO_SIZE    SZ_4K
 
+#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
 extern int gpmc_nand_init(struct omap_nand_platform_data *d);
+#else
+static inline int gpmc_nand_init(struct omap_nand_platform_data *d)
+{
+       return 0;
+}
+#endif