From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754520AbcCAPEo (ORCPT ); Tue, 1 Mar 2016 10:04:44 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:37985 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754330AbcCAPEm (ORCPT ); Tue, 1 Mar 2016 10:04:42 -0500 Subject: Re: [PATCH 2/2] cpufreq: mediatek: allow building as a module To: Arnd Bergmann , "Rafael J. Wysocki" , Viresh Kumar References: <1456761867-1742824-1-git-send-email-arnd@arndb.de> <1456761867-1742824-2-git-send-email-arnd@arndb.de> Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org From: Matthias Brugger Message-ID: <56D5AF86.7000809@gmail.com> Date: Tue, 1 Mar 2016 16:04:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1456761867-1742824-2-git-send-email-arnd@arndb.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/02/16 17:04, Arnd Bergmann wrote: > The MT8173 cpufreq driver can currently only be built-in, but > it has a Kconfig dependency on the thermal core. THERMAL > can be a loadable module, which in turn makes this driver > impossible to build. > > It is nicer to make the cpufreq driver a module as well, so > this patch turns the option in to a 'tristate' and adapts > the dependency accordingly. > > The driver has no module_exit() function, so it will continue > to not support unloading, but it can be built as a module > and loaded at runtime now. > > Signed-off-by: Arnd Bergmann > Fixes: 5269e7067cd6 ("cpufreq: Add ARM_MT8173_CPUFREQ dependency on THERMAL") > --- Reviewed-by: Matthias Brugger > drivers/cpufreq/Kconfig.arm | 4 ++-- > drivers/cpufreq/mt8173-cpufreq.c | 1 + > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm > index 0031069b64c9..14b1f9393b05 100644 > --- a/drivers/cpufreq/Kconfig.arm > +++ b/drivers/cpufreq/Kconfig.arm > @@ -84,10 +84,10 @@ config ARM_KIRKWOOD_CPUFREQ > SoCs. > > config ARM_MT8173_CPUFREQ > - bool "Mediatek MT8173 CPUFreq support" > + tristate "Mediatek MT8173 CPUFreq support" > depends on ARCH_MEDIATEK && REGULATOR > depends on ARM64 || (ARM_CPU_TOPOLOGY && COMPILE_TEST) > - depends on !CPU_THERMAL || THERMAL=y > + depends on !CPU_THERMAL || THERMAL > select PM_OPP > help > This adds the CPUFreq driver support for Mediatek MT8173 SoC. > diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c > index 1efba340456d..2058e6d292ce 100644 > --- a/drivers/cpufreq/mt8173-cpufreq.c > +++ b/drivers/cpufreq/mt8173-cpufreq.c > @@ -17,6 +17,7 @@ > #include > #include > #include > +#include > #include > #include > #include >