From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758167AbcCVDOm (ORCPT ); Mon, 21 Mar 2016 23:14:42 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:34913 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751446AbcCVDOk (ORCPT ); Mon, 21 Mar 2016 23:14:40 -0400 Date: Tue, 22 Mar 2016 08:44:36 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Linux PM list , Linux Kernel Mailing List Subject: Re: [PATCH 1/3] cpufreq: Introduce cpufreq_start_governor() Message-ID: <20160322031436.GR27778@vireshk-i7> References: <1780622.pJaGsuQWcI@vostro.rjw.lan> <5659583.gVxCIrvT16@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5659583.gVxCIrvT16@vostro.rjw.lan> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21-03-16, 15:45, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Starting a governor in cpufreq always follows the same pattern > involving two calls to cpufreq_governor(), one with the event > argument set to CPUFREQ_GOV_START and one with that argument set to > CPUFREQ_GOV_LIMITS. > > Introduce cpufreq_start_governor() that will carry out those two > operations and make all places where governors are started use it. > > That slightly modifies the behavior of cpufreq_set_policy() which > now also will go back to the old governor if the second call to > cpufreq_governor() (the one with event equal to CPUFREQ_GOV_LIMITS) > fails, but that really is how it should work in the first place. > > Also cpufreq_resume() will now pring an error message if the > CPUFREQ_GOV_LIMITS call to cpufreq_governor() fails, but that > makes it follow cpufreq_add_policy_cpu() and cpufreq_offline() > in that respect. > > Signed-off-by: Rafael J. Wysocki > --- > drivers/cpufreq/cpufreq.c | 44 ++++++++++++++++++++++---------------------- > 1 file changed, 22 insertions(+), 22 deletions(-) Acked-by: Viresh Kumar -- viresh