From patchwork Mon Sep 18 20:48:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 112947 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4114561qgf; Mon, 18 Sep 2017 13:48:43 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7feTR0S8zAjRb62eZ4c/SlAW41Z/XaK730iCxkQ1EMb9DZlO425LtX0F1+hdv8tgfTLy61 X-Received: by 10.98.58.210 with SMTP id v79mr32930292pfj.131.1505767723253; Mon, 18 Sep 2017 13:48:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505767723; cv=none; d=google.com; s=arc-20160816; b=eAKUUax0bD6Imh8sujPs5hxdTFehnO1hDq+vw3NMWw16CllmJGCD5sTT6Wmk7pSou3 /wE21BFjBGwR3TntpwjX75sN0eSapZpNO6jXIKHoeOHEOMWD1XVJFGqHYsimKKPJFcVB Gi9ytdOo9QTcme5qXskymIA92u8/y3FGFdU4IgruJvyrAre5vbN5d3tsV58+lomqkphf kSPBktNKbr7O1AjZsOrvoG8ByfSFVQDJIDFqeaw8SmOq6FnXsz+DxdVEMC8l1lZcCLhA 0VwcF6JFwwXAyEC211Ll435t3uLPDXbBR3E+Dldq9piRHJuEeR4j1G0dhPRO8jPKCt4a NVig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=DYXsvuazxDRWliLANaTri3V2eiNYepnMSbF8QW7l9LM=; b=o7a3ocHwLTnlhvYUR2E23XYeeqmba3TqcAVHFmJvaHIVpnzRGxBirnERXwKhnYbP90 YP6lJgxQ9ukkZusIzFcZKemwqMXOWHwKYc9MuTO9bnqEfoOqyfarXvSiS70piU7yGJyZ Gve0YBISjL19WLOqW2b7V88l3IkUzl/cuauTzK6M/OZFMLeKrdofL5rZKC/ZQBYr/KOT CDb3/m7OcnbeC0pY6PozJov1Hd/Sn9vGY3U7+S8OlwKqMKtNM3KpKgjBijeTiWKUQkhj 8WC1wn5FNrg1Yu0aGR66BVRTutW5+sKIP6jexppyU1WbPWjHHuvVUZg2Ml4wWF6WM0F/ SuHA== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o9si196581pgp.260.2017.09.18.13.48.42; Mon, 18 Sep 2017 13:48:43 -0700 (PDT) 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 S1750990AbdIRUsl (ORCPT + 12 others); Mon, 18 Sep 2017 16:48:41 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:53547 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750747AbdIRUsk (ORCPT ); Mon, 18 Sep 2017 16:48:40 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0MAk71-1e5qXg1yDT-00BvP0; Mon, 18 Sep 2017 22:48:27 +0200 From: Arnd Bergmann To: Zhang Rui , Eduardo Valentin Cc: Leonard Crestez , Shawn Guo , Arnd Bergmann , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] thermal: imx: add NVMEM dependency Date: Mon, 18 Sep 2017 22:48:16 +0200 Message-Id: <20170918204825.159177-1-arnd@arndb.de> X-Mailer: git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uuFCkavxZkg6nJWA== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The driver now fails to link into vmlinux when CONFIG_NVMEM is a loadable module: drivers/thermal/imx_thermal.o: In function `imx_thermal_probe': imx_thermal.c:(.text+0x360): undefined reference to `nvmem_cell_read_u32' imx_thermal.c:(.text+0x360): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `nvmem_cell_read_u32' imx_thermal.c:(.text+0x388): undefined reference to `nvmem_cell_read_u32' imx_thermal.c:(.text+0x388): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `nvmem_cell_read_u32' This adds a Kconfig dependency to force it to be a module as well when its dependency is loadable. Fixes: 7fe5ba04fcdc ("thermal: imx: Add support for reading OCOTP through nvmem") Signed-off-by: Arnd Bergmann --- drivers/thermal/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.9.0 Reviewed-by: Leonard Crestez diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 07002df4f83a..cb14f1ec5953 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -206,6 +206,7 @@ config HISI_THERMAL config IMX_THERMAL tristate "Temperature sensor driver for Freescale i.MX SoCs" depends on (ARCH_MXC && CPU_THERMAL) || COMPILE_TEST + depends on NVMEM || !NVMEM depends on MFD_SYSCON depends on OF help