From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752353AbbIKISB (ORCPT ); Fri, 11 Sep 2015 04:18:01 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34994 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751622AbbIKIR6 (ORCPT ); Fri, 11 Sep 2015 04:17:58 -0400 Date: Fri, 11 Sep 2015 13:47:53 +0530 From: Viresh Kumar To: Arnd Bergmann Cc: "Rafael J. Wysocki" , Pi-Cheng Chen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: cpufreq: mediatek: allow modular build Message-ID: <20150911081753.GK9650@linux> References: <1768766.yu1lxjsjLL@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1768766.yu1lxjsjLL@wuerfel> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11-09-15, 10:15, Arnd Bergmann wrote: > The newly merged cpufreq-mt8173 driver breaks the ARM allmodconfig > build because of a dependency on the cpu-cooling infrastructure that > may be built as a loadable module: > > drivers/built-in.o: In function `mtk_cpufreq_ready': > binder.c:(.text+0x324c8c): undefined reference to `of_cpufreq_cooling_register' > drivers/built-in.o: In function `mtk_cpufreq_exit': > binder.c:(.text+0x324ea0): undefined reference to `cpufreq_cooling_unregister' > > This works around the issue by allowing this driver to be built > as a module as well, and adding a dependency on THERMAL that prevents > it from being built-in when the cpu-cooling driver is a module. > > This is not perfect because there is still a case where THERMAL=m > and CPU_COOLING=n that should allow us to have this driver built-in > as well, but I decided to follow existing practice in other drivers > here, and that case seems irrelevant in practice. > > Signed-off-by: Arnd Bergmann > --- > I have not checked if someone else has already sent a patch for this, > just ignore mine if the issue has been fixed already. 5269e7067cd6 ("cpufreq: Add ARM_MT8173_CPUFREQ dependency on THERMAL") in Rafael's tree. Its a bit different, so have a look. -- viresh