• P
    blackfin: fix ifdef fustercluck in mach-bf538/boards/ezkit.c · fa83af7e
    Paul Gortmaker 提交于
    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: NMike Frysinger <vapier@gentoo.org>
    Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
    fa83af7e
ezkit.c 22.9 KB