All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: jz4780: Fix build for m68k and sparc64
@ 2015-04-15  3:21 ` Guenter Roeck
  0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2015-04-15  3:21 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Guenter Roeck, Zubair Lutfullah Kakakhel

Fix:

drivers/i2c/busses/i2c-jz4780.c: In function 'jz4780_i2c_readw':
drivers/i2c/busses/i2c-jz4780.c:181:2: error:
		implicit declaration of function 'readw'
drivers/i2c/busses/i2c-jz4780.c: In function 'jz4780_i2c_writew':
drivers/i2c/busses/i2c-jz4780.c:187:2: error:
		implicit declaration of function 'writew'

seen with sparc64:allmodconfig and m68k:allmodconfig.

The driver depends on HAS_IOMEM, and must include linux/io.h.

Fixes: ba92222ed63a ("i2c: jz4780: Add i2c bus controller driver
	for Ingenic JZ4780")
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/i2c/busses/Kconfig      | 1 +
 drivers/i2c/busses/i2c-jz4780.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 2255af23b9c7..c78b6cbd1106 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -586,6 +586,7 @@ config I2C_IOP3XX
 config I2C_JZ4780
 	tristate "JZ4780 I2C controller interface support"
 	depends on MACH_JZ4780 || COMPILE_TEST
+	depends on HAS_IOMEM
 	help
 	 If you say yes to this option, support will be included for the
 	 Ingenic JZ4780 I2C controller.
diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c
index ce1d69324169..f2761ab2ef32 100644
--- a/drivers/i2c/busses/i2c-jz4780.c
+++ b/drivers/i2c/busses/i2c-jz4780.c
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/i2c.h>
+#include <linux/io.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-15 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-15  3:21 [PATCH] i2c: jz4780: Fix build for m68k and sparc64 Guenter Roeck
2015-04-15  3:21 ` Guenter Roeck
2015-04-15 15:41 ` Wolfram Sang
2015-04-15 15:41   ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.