From patchwork Fri Feb 19 22:36:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102724 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp59115lbl; Fri, 19 Feb 2016 14:37:15 -0800 (PST) X-Received: by 10.98.42.85 with SMTP id q82mr21390092pfq.18.1455921435779; Fri, 19 Feb 2016 14:37:15 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ze7si14657810pac.34.2016.02.19.14.37.15; Fri, 19 Feb 2016 14:37:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757841AbcBSWhD (ORCPT + 11 others); Fri, 19 Feb 2016 17:37:03 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:58785 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757484AbcBSWhC (ORCPT ); Fri, 19 Feb 2016 17:37:02 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0LwmRY-1ZvRDu0NAm-016Rog; Fri, 19 Feb 2016 23:36:26 +0100 From: Arnd Bergmann To: Eduardo Valentin Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org, Matthias Brugger , Zhang Rui , Sascha Hauer , linux-kernel@vger.kernel.org Subject: [PATCH] thermal: mediatek: add missing dependencies Date: Fri, 19 Feb 2016 23:36:06 +0100 Message-Id: <1455921381-1881305-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:zdk7volIoFecL7aHi+kSlXyupIRhDuYnRTcaNvf3v6JClcWMuK8 K7i3wqneHZMYuKvbaKtVXk02qPZei950vffNQ5xTW0MQxFLKINhQD9zlrXf+4DfyYV9P7D/ MT35ZW7SWwvL81pkRnyNWB+mT3m8TC0eoATPS7n+MZZGpl+rFL67iJU7h3oUctfC+8Fkjrq bE6qU5bR+bZN0w6N9iWNg== X-UI-Out-Filterresults: notjunk:1; V01:K0:3FL2nW+RIDc=:OhZD2X/aByK/TZ856Ky6Wl i4UXslj6uLMqy95Kv5u/xAE9k2M1zJx+HGJqK0SUDc/5u8RhlHV2wSgHxbAFZKr9piDE665nj VIDFdvMRiMPH80ADVu/qXl5mARg9D1Z7inYmD70M8lPx9XxOBVltA/IIK+j6lWLTrAzAT1QUH ZxaarhHw+CJ07MeVTAahGa38IREkywiIQ2cKtdL4ZeT333tagjTN7v5mim8wYA005/RZsDerq 0qklT9zJF5Cmqjh6YtIfnOp/zAI8bGwSGGDl6G055Tehv0k22k9bG/Z3wbjsjl7JLP0kAHPCm ZALGSTzFNZVlOEy7zote56atQ9dTTAm27xh0c5zlQ6ocJV1BWln004FhBOEGE2WhNBluy1lbe 1WfKKVHxtVM76GOVBesau0dfzf/c1k5rfhchOhrJoGCLFuyk8lvdOfpA4HQ3tOgM5CIHCowfg gtqERhYlB6tiDK2STPgwaehQb28p/bYqSzl3r78Xl0zFZ3DcdnXyOTWTT9f7WdLH0L+C40Biy 5QebqtUYnIJJ/DVJ+Mbtf19KukxStoAyqCMlbk0yzqb9cIAjCfJn5epcF9rYF6w9G3wLf7ZE1 WQrr0NkUC4sq7BRBc6u3fEOqIPPriP5fhGAivlVEqsCEEkpimkk39kYjN7+VW9Sj6UReKRq0m Nu5Y9etZMM3gDRt+hFYulWcOTh5+3/ASRgyFIANi3HM+/SstEWP+LHo8i7qM865KoFvk= Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The newly added mtk_thermal driver uses the generic reset and nvmem infrastructure, but lacks a dependency that enforces them from actually being present: drivers/thermal/mtk_thermal.c: In function 'mtk_thermal_probe': drivers/thermal/mtk_thermal.c:560:8: error: implicit declaration of function 'device_reset' [-Werror=implicit-function-declaration] drivers/thermal/built-in.o: In function `mtk_thermal_probe': mtk_thermal.c:(.text+0x7fb0): undefined reference to `nvmem_cell_get' mtk_thermal.c:(.text+0x7fd8): undefined reference to `nvmem_cell_read' mtk_thermal.c:(.text+0x7fe4): undefined reference to `nvmem_cell_put' Without CONFIG_THERMAL, the driver cannot build, so this needs to be a hard dependency. For CONFIG_NVMEM, the header file allows building the driver even when the subsystem is disabled, but we get the link error above when nvmem is built as a module and the thermal driver is built-in, so we can allow compile-testing when NVMEM is completely disabled, but otherwise require the dependency. Signed-off-by: Arnd Bergmann --- drivers/thermal/Kconfig | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 5e7c97a3f1d8..75d164341f0d 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -368,6 +368,8 @@ config INTEL_PCH_THERMAL config MTK_THERMAL tristate "Temperature sensor driver for mediatek SoCs" depends on ARCH_MEDIATEK || COMPILE_TEST + depends on NVMEM || (!NVMEM && COMPILE_TEST) + depends on RESET_CONTROLLER default y help Enable this option if you want to have support for thermal management