lkml.org 
[lkml]   [2016]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mtd: spi-nor: don't include linux/mtd/cfi.h from header
Date
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.

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
\
 
 \ /
  Last update: 2016-09-17 09:59    [W:0.035 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site