Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751839AbaLCGbD (ORCPT ); Wed, 3 Dec 2014 01:31:03 -0500 Received: from mail-oi0-f48.google.com ([209.85.218.48]:48331 "EHLO mail-oi0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbaLCGbB (ORCPT ); Wed, 3 Dec 2014 01:31:01 -0500 MIME-Version: 1.0 In-Reply-To: <1417186410-24551-1-git-send-email-edubezval@gmail.com> References: <1417186410-24551-1-git-send-email-edubezval@gmail.com> Date: Wed, 3 Dec 2014 12:00:58 +0530 Message-ID: Subject: Re: [PATCHv3 1/1] thermal: cpu_cooling: check for the readiness of cpufreq layer From: Viresh Kumar To: Eduardo Valentin Cc: Linux PM , Lukasz Majewski , LKML , "devicetree@vger.kernel.org" , Grant Likely , Kukjin Kim , "linux-arm-kernel@lists.infradead.org" , linux-samsung-soc , Naveen Krishna Chatradhi , Rob Herring , Zhang Rui Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28 November 2014 at 20:23, Eduardo Valentin wrote: > diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c > index 1ab0018..88d2775 100644 > --- a/drivers/thermal/cpu_cooling.c > +++ b/drivers/thermal/cpu_cooling.c > @@ -440,6 +440,9 @@ __cpufreq_cooling_register(struct device_node *np, > int ret = 0, i; > struct cpufreq_policy policy; > > + if (!cpufreq_frequency_get_table(0)) Please add a pr_debug() here, that will be quite useful while debugging. Also, you can't simply pass 0 to get_table() above. We might be registering the cooling device for some other cluster as well.. This is what I have done in my patch earlier. cpufreq_frequency_get_table(cpumask_first(clip_cpus)); And this will work for all cases. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/