From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752998AbbKPR4I (ORCPT ); Mon, 16 Nov 2015 12:56:08 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:44058 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752190AbbKPR4D (ORCPT ); Mon, 16 Nov 2015 12:56:03 -0500 Subject: Re: [PATCH] hwmon: scpi: add thermal-of dependency To: Arnd Bergmann , Jean Delvare References: <4264967.aVlONpCXFM@wuerfel> Cc: Punit Agrawal , lm-sensors@lm-sensors.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Guenter Roeck Message-ID: <564A18AF.1030804@roeck-us.net> Date: Mon, 16 Nov 2015 09:55:59 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <4264967.aVlONpCXFM@wuerfel> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/16/2015 08:56 AM, Arnd Bergmann wrote: > The newly added scpi thermal support is broken when the scpi driver > is built-in but the thermal driver is a loadable module: > > drivers/built-in.o: In function `scpi_hwmon_probe': > (.text+0x444d70): undefined reference to `thermal_zone_of_sensor_unregister' > (.text+0x444d94): undefined reference to `thermal_zone_of_sensor_register' > drivers/built-in.o: In function `scpi_hwmon_remove': > (text+0x444e6c): undefined reference to `thermal_zone_of_sensor_unregister' > > This uses the same Kconfig trick that we have in a couple of other > drivers already to ensure we can only select the driver in valid > configurations when either THERMAL_OF is disabled, or when with a > dependency on CONFIG_THERMAL that can force SCPI to be a loadable > module in the case I was hitting. > > Signed-off-by: Arnd Bergmann > Fixes: 68acc77a2d51 ("hwmon: Support thermal zones registration for SCP temperature sensors") Applied. Thanks, Guenter > > diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig > index 842b0043ad94..597814177f50 100644 > --- a/drivers/hwmon/Kconfig > +++ b/drivers/hwmon/Kconfig > @@ -324,6 +324,7 @@ config SENSORS_APPLESMC > config SENSORS_ARM_SCPI > tristate "ARM SCPI Sensors" > depends on ARM_SCPI_PROTOCOL > + depends on THERMAL || !THERMAL_OF > help > This driver provides support for temperature, voltage, current > and power sensors available on ARM Ltd's SCP based platforms. The > >