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: 8364661 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1E1E69F372 for ; Fri, 19 Feb 2016 22:37:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46B7E2044C for ; Fri, 19 Feb 2016 22:37:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 40AF720429 for ; Fri, 19 Feb 2016 22:37:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aWtfY-0004Cx-Uo; Fri, 19 Feb 2016 22:37:00 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aWtfX-0003zx-28; Fri, 19 Feb 2016 22:37:00 +0000 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 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= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160219_143659_468537_3909C952 X-CRM114-Status: GOOD ( 12.92 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-pm@vger.kernel.org, Sascha Hauer , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , Zhang Rui , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 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(+) 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