From 8868db37b7f9d7408161cc55bd6566f338762cb0 Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Tue, 13 Mar 2012 00:18:19 +0000 Subject: Make the presence of Linux SPI headers mandatory for linux_spi This solution is copied from ft2232_spi and is equally hacky. Thanks to M.K. for investigating the history of , which led to a hopefully more robust check. Corresponding to flashrom svn r1517. Signed-off-by: Stefan Tauner Acked-by: Michael Karcher --- linux_spi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'linux_spi.c') diff --git a/linux_spi.c b/linux_spi.c index 17d003e..f4d30c9 100644 --- a/linux_spi.c +++ b/linux_spi.c @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if CONFIG_LINUX_SPI == 1 + #include #include #include @@ -24,6 +26,7 @@ #include #include #include +#include #include #include #include "flash.h" @@ -176,3 +179,5 @@ static int linux_spi_write_256(struct flashctx *flash, uint8_t *buf, return spi_write_chunked(flash, buf, start, len, ((unsigned int)getpagesize()) - 4); } + +#endif // CONFIG_LINUX_SPI == 1 -- cgit v1.1