From patchwork Fri Mar 4 01:03:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 8497461 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DE7CBC0553 for ; Fri, 4 Mar 2016 01:04:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF37A20138 for ; Fri, 4 Mar 2016 01:04:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C5DD6202FF for ; Fri, 4 Mar 2016 01:04:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932781AbcCDBEN (ORCPT ); Thu, 3 Mar 2016 20:04:13 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:36816 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932118AbcCDBEM (ORCPT ); Thu, 3 Mar 2016 20:04:12 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O3H00G5HPMXQR30@mailout3.w1.samsung.com>; Fri, 04 Mar 2016 01:04:09 +0000 (GMT) X-AuditID: cbfec7f5-f79b16d000005389-f2-56d8df08b39f Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 76.19.21385.80FD8D65; Fri, 4 Mar 2016 01:04:08 +0000 (GMT) Received: from localhost.localdomain ([10.113.63.52]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O3H00A65PMQG420@eusync3.samsung.com>; Fri, 04 Mar 2016 01:04:08 +0000 (GMT) From: Krzysztof Kozlowski To: Zhang Rui , Eduardo Valentin , Lukasz Majewski , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Arnd Bergmann , Geert Uytterhoeven , Krzysztof Kozlowski Subject: [PATCH v3] thermal: Fix build error of missing devm_ioremap_resource on UM Date: Fri, 04 Mar 2016 10:03:59 +0900 Message-id: <1457053439-12598-1-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 2.5.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkluLIzCtJLcpLzFFi42I5/e/4VV2O+zfCDBpmm1n8nXSM3WL+lWus Fs9u7WWyeP3C0OLNw82MFpd3zWGz+Nx7hNFixvl9TBZPHvaxOXB6/P41idFj56y77B6L97xk 8jh0uIPRo2/LKkaPz5vkAtiiuGxSUnMyy1KL9O0SuDI23b7DVvBMrmLW0hfMDYwdkl2MnBwS AiYSF1a+ZISwxSQu3FvP1sXIxSEksJRR4v+0flYI5z+jxPEd+9hBqtgEjCU2L18CViUicIVR ou35dZYuRg4OZoFaidVLvEBqhAVCJV5tugBWzyKgKtHwbg4ziM0r4C4x/9kiVpByCQE5iQUX 0icwci9gZFjFKJpamlxQnJSea6RXnJhbXJqXrpecn7uJERJAX3cwLj1mdYhRgINRiYf3RsP1 MCHWxLLiytxDjBIczEoivEp9N8KEeFMSK6tSi/Lji0pzUosPMUpzsCiJ887c9T5ESCA9sSQ1 OzW1ILUIJsvEwSnVwJjbp2hu7ff9WeW6J8abNb2WTVg4P/Z+4stSTtaldR/zEttuh24s8zp5 +xhL3pIVWr4rVnrcN1OKm7a66uLd5OdS7vEdE6S/dvwpPpB9OivpamXJ8s/fXOTMTyf815s9 /5zjubL9Nza/mh84J1tgn3XHfoacexlhf97NfGHCM+n43WZmk8BtXppKLMUZiYZazEXFiQCV p76oHAIAAA== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The devres.o gets linked if HAS_IOMEM is present so on ARCH=um allyesconfig (COMPILE_TEST) failed on many files with: drivers/built-in.o: In function `kirkwood_thermal_probe': kirkwood_thermal.c:(.text+0x390a25): undefined reference to `devm_ioremap_resource' drivers/built-in.o: In function `exynos_tmu_probe': exynos_tmu.c:(.text+0x39246b): undefined reference to `devm_ioremap' The users of devm_ioremap_resource() which are compile-testable should depend on HAS_IOMEM. Signed-off-by: Krzysztof Kozlowski --- Changes since v2: 1. Follow Geert's advice of putting HAS_IOMEM as separate dependency. Changes since v1: 1. Fix linking error also on TI. 2. Use different approach for HAS_IOMEM dependency. IT is needed only for COMPILE_TEST so use && to show that. --- drivers/thermal/Kconfig | 8 ++++++++ drivers/thermal/samsung/Kconfig | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 5e7c97a3f1d8..bc591248144a 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -178,6 +178,7 @@ config THERMAL_EMULATION config HISI_THERMAL tristate "Hisilicon thermal driver" depends on (ARCH_HISI && CPU_THERMAL && OF) || COMPILE_TEST + depends on HAS_IOMEM help Enable this to plug hisilicon's thermal sensor driver into the Linux thermal framework. cpufreq is used as the cooling device to throttle @@ -197,6 +198,7 @@ config IMX_THERMAL config SPEAR_THERMAL tristate "SPEAr thermal sensor driver" depends on PLAT_SPEAR || COMPILE_TEST + depends on HAS_IOMEM depends on OF help Enable this to plug the SPEAr thermal sensor driver into the Linux @@ -206,6 +208,7 @@ config ROCKCHIP_THERMAL tristate "Rockchip thermal driver" depends on ARCH_ROCKCHIP || COMPILE_TEST depends on RESET_CONTROLLER + depends on HAS_IOMEM help Rockchip thermal driver provides support for Temperature sensor ADC (TS-ADC) found on Rockchip SoCs. It supports one critical @@ -223,6 +226,7 @@ config RCAR_THERMAL config KIRKWOOD_THERMAL tristate "Temperature sensor on Marvell Kirkwood SoCs" depends on MACH_KIRKWOOD || COMPILE_TEST + depends on HAS_IOMEM depends on OF help Support for the Kirkwood thermal sensor driver into the Linux thermal @@ -231,6 +235,7 @@ config KIRKWOOD_THERMAL config DOVE_THERMAL tristate "Temperature sensor on Marvell Dove SoCs" depends on ARCH_DOVE || MACH_DOVE || COMPILE_TEST + depends on HAS_IOMEM depends on OF help Support for the Dove thermal sensor driver in the Linux thermal @@ -249,6 +254,7 @@ config DB8500_THERMAL config ARMADA_THERMAL tristate "Armada 370/XP thermal management" depends on ARCH_MVEBU || COMPILE_TEST + depends on HAS_IOMEM depends on OF help Enable this option if you want to have support for thermal management @@ -368,6 +374,7 @@ config INTEL_PCH_THERMAL config MTK_THERMAL tristate "Temperature sensor driver for mediatek SoCs" depends on ARCH_MEDIATEK || COMPILE_TEST + depends on HAS_IOMEM default y help Enable this option if you want to have support for thermal management @@ -375,6 +382,7 @@ config MTK_THERMAL menu "Texas Instruments thermal drivers" depends on ARCH_HAS_BANDGAP || COMPILE_TEST +depends on HAS_IOMEM source "drivers/thermal/ti-soc-thermal/Kconfig" endmenu diff --git a/drivers/thermal/samsung/Kconfig b/drivers/thermal/samsung/Kconfig index e0da3865e060..222e644169f0 100644 --- a/drivers/thermal/samsung/Kconfig +++ b/drivers/thermal/samsung/Kconfig @@ -1,6 +1,7 @@ config EXYNOS_THERMAL tristate "Exynos thermal management unit driver" depends on THERMAL_OF + depends on HAS_IOMEM help If you say yes here you get support for the TMU (Thermal Management Unit) driver for SAMSUNG EXYNOS series of SoCs. This driver initialises