Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1484363
| From | Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mtd: spi-nor: don't include linux/mtd/cfi.h from header |
| Date | 2016-09-15 18:00 +0200 |
| Message-ID | <shHeW-rB-33@gated-at.bofh.it> (permalink) |
| References | <shH5g-o6-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 15 September 2016 at 12:41, Arnd Bergmann <arnd@arndb.de> wrote:
> The newly added broadcom qspi driver in drivers/spi produces a build
> warning when CONFIG_MTD is disabled:
>
> include/linux/mtd/cfi.h:76:2: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Werror=cpp]
>
> Since drivers like this one don't actually need the cfi.h header,
> we can just remove it from the spi-nor.h file and add it to
> the only place that actually needs it.
>
AFAICS, the mtd/cfi.h header is needed only for CFI_MFR_xxx,
which are defined in the spi-nor.h header.
Maybe we are better moving those to spi-nor.c as well.
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: fa236a7ef240 ("spi: bcm-qspi: Add Broadcom MSPI driver")
> ---
> drivers/mtd/spi-nor/spi-nor.c | 1 +
> include/linux/mtd/spi-nor.h | 1 -
> 2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index d0fc165d7d66..94afcb9fdaf7 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -21,6 +21,7 @@
> #include <linux/mtd/mtd.h>
> #include <linux/of_platform.h>
> #include <linux/spi/flash.h>
> +#include <linux/mtd/cfi.h>
> #include <linux/mtd/spi-nor.h>
>
> /* Define max times to check status register before we give up. */
> diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
> index c425c7b4c2a0..60ef29565743 100644
> --- a/include/linux/mtd/spi-nor.h
> +++ b/include/linux/mtd/spi-nor.h
> @@ -11,7 +11,6 @@
> #define __LINUX_MTD_SPI_NOR_H
>
> #include <linux/bitops.h>
> -#include <linux/mtd/cfi.h>
> #include <linux/mtd/mtd.h>
>
> /*
> --
> 2.9.0
>
--
Ezequiel GarcĂa, VanguardiaSur
www.vanguardiasur.com.ar
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] mtd: spi-nor: don't include linux/mtd/cfi.h from header Arnd Bergmann <arnd@arndb.de> - 2016-09-15 17:50 +0200 Re: [PATCH] mtd: spi-nor: don't include linux/mtd/cfi.h from header Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> - 2016-09-15 18:00 +0200
csiph-web