spi: bcm-qspi: shut up warning about cfi header inclusion
authorArnd Bergmann <arnd@arndb.de>
Mon, 19 Feb 2018 10:13:24 +0000 (11:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:05:55 +0000 (11:05 +0100)
commitc30e6636ce101fd61331092c490b9d9c55b2d143
treec9d7864d5133fd93d62d24cdc64f4e52c4aff72e
parent890c52ab3d2a7e19714f698d36e83ef8e1a8e1b3
spi: bcm-qspi: shut up warning about cfi header inclusion

When CONFIG_MTD_CFI is disabled, we get a warning for this spi driver:

include/linux/mtd/cfi.h:76:2: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Werror=cpp]

The problem here is a layering violation that was fixed in mainline kernels with
a larger rework in commit 054e532f8f90 ("spi: bcm-qspi: Remove hardcoded settings
and spi-nor.h dependency"). We can't really backport that to stable kernels, so
this just adds a Kconfig dependency to make it either build cleanly or force it
to be disabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/Kconfig