Thread (42 messages) 42 messages, 5 authors, 2016-03-03

[rtc-linux] [RFC 15/15] mfd: syscon: Fix build of missing ioremap on UM

From: Krzysztof Kozlowski <hidden>
Date: 2016-03-03 08:06:27
Also in: linux-arm-kernel, linux-media, linux-samsung-soc, lkml
Subsystem: multifunction devices (mfd), the rest · Maintainers: Lee Jones, Linus Torvalds

Since commit c89c0114955a ("mfd: syscon: Set regmap max_register in
of_syscon_register") the syscon uses ioremap so it fails on COMPILE_TEST
without HAS_IOMEM:

drivers/mfd/syscon.c: In function =E2=80=98of_syscon_register=E2=80=99:
drivers/mfd/syscon.c:67:9: error: implicit declaration of function =E2=80=
=98ioremap=E2=80=99 [-Werror=3Dimplicit-function-declaration]
  base =3D ioremap(res.start, resource_size(&res));
         ^
drivers/mfd/syscon.c:67:7: warning: assignment makes pointer from integer w=
ithout a cast [-Wint-conversion]
  base =3D ioremap(res.start, resource_size(&res));
       ^
drivers/mfd/syscon.c:109:2: error: implicit declaration of function =E2=80=
=98iounmap=E2=80=99 [-Werror=3Dimplicit-function-declaration]
  iounmap(base);

When selecting MFD_SYSCON, depend on HAS_IOMEM to avoid unmet direct
dependencies.

Reported-by: kbuild test robot <redacted>
Fixes: c89c0114955a ("mfd: syscon: Set regmap max_register in of_syscon_reg=
ister")
Signed-off-by: Krzysztof Kozlowski <redacted>
---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index aa21dc55eb15..2e5b1e525a1d 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1034,6 +1034,7 @@ config MFD_SUN6I_PRCM
=20
 config MFD_SYSCON
 	bool "System Controller Register R/W Based on Regmap"
+	depends on HAS_IOMEM
 	select REGMAP_MMIO
 	help
 	  Select this option to enable accessing system control registers
--=20
2.5.0

--=20
--=20
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---=20
You received this message because you are subscribed to the Google Groups "=
rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help