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: 8364671 Return-Path: X-Original-To: patchwork-linux-pm@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 003C69F372 for ; Fri, 19 Feb 2016 22:37:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2299A20450 for ; Fri, 19 Feb 2016 22:37:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E90520429 for ; Fri, 19 Feb 2016 22:37:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757841AbcBSWhD (ORCPT ); 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 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 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