* [PATCH] i2c: jz4780: Fix build for m68k and sparc64
@ 2015-04-15 3:21 Guenter Roeck
[not found] ` <1429068073-7595-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2015-04-15 3:21 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, 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-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
---
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] 2+ messages in thread
* Re: [PATCH] i2c: jz4780: Fix build for m68k and sparc64
[not found] ` <1429068073-7595-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
@ 2015-04-15 15:41 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2015-04-15 15:41 UTC (permalink / raw)
To: Guenter Roeck
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Zubair Lutfullah Kakakhel
[-- Attachment #1: Type: text/plain, Size: 2069 bytes --]
Guenter,
Thanks for catching this!
> 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-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
> ---
> 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
You sure? We have
menu "I2C Hardware Bus support"
depends on HAS_IOMEM
in drivers/i2c/busses/Kconfig. For me, menuconfig shows that the driver
is already depending 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>
The sorting needs to be fixed.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-15 15:41 UTC | newest]
Thread overview: 2+ 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
[not found] ` <1429068073-7595-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-04-15 15:41 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).