]> git.baikalelectronics.ru Git - kernel.git/commit
blackfin: fix ifdef fustercluck in mach-bf538/boards/ezkit.c
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 19 Apr 2012 03:31:28 +0000 (23:31 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 26 Apr 2012 18:46:51 +0000 (14:46 -0400)
commit50ee5f335a8ea69a28b8291727fcde30893fbc99
tree860076c80b6651bd0451c904f0c41120d4b6e702
parent15cd38fcbae40473d8b5771e00cb7fb5bf1a77be
blackfin: fix ifdef fustercluck in mach-bf538/boards/ezkit.c

This file has lots and lots of ifdef, around structure decls
and structure usages.  The failure issue was that we would
build the BF538-EZKIT_defconfig and get:

 arch/blackfin/mach-bf538/boards/ezkit.c:924:3: error: 'bfin_lq035q1_device'
 undeclared here (not in a function)

even though the same ifdef _appeared_ to enable both the struct
declaration and the code that used it.  Yet cpp was telling us we
didn't have the struct, but we still had the usage of it.

However, _appeared_ is the operative word.  After marking all the
anonymous #endif with their parent #ifdef config options, it was
_then_ clear that there was a misplaced #endif that was hiding
the struct declaration.

The real guts of the patch boils down to this:

-#endif
+#endif /* CONFIG_MTD_M25P80 */
+#endif /* CONFIG_SPI_BFIN5XX */
 [...]
-#endif  /* spi master and devices */

but since I had to tag the #endif with their respective #ifdef
options to find this misplaced SPI endif, it would be silly to
then go and delete them all.  So they stay.

Cc: Sonic Zhang <sonic.zhang@analog.com>
Cc: Bob Liu <lliubbo@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
arch/blackfin/mach-bf538/boards/ezkit.c