From patchwork Wed Jun 19 08:52:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 17972 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6CE302397B for ; Wed, 19 Jun 2013 08:54:40 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id jz10sf7105066veb.1 for ; Wed, 19 Jun 2013 01:54:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe; bh=wNVAug8FmDAwxX9qzO08DA81opFkAVddd9BRu6cuQLs=; b=QKj/5B1A1AM9BD3bHloAjj5lVyGhzjhqxO451FDlu6cP73bugx/G7KQuSKsnP/Qzm0 TlofaxaUVWigFNv2bd0Hw0mxuD6BVCuMG/gt1JyuAxk9OAeOADzVcJzSuSVAuEYh1GmI Xhb6vhEciKyL/n+4N2nqdf0DG1+C4BtwsORctdxBQMgF68nx8ww4mUxbDTyjgjglh6kt ctN+jzxgbTOPcof7pll1kMXowM+NYzr3Y4RohBjXF6JPE+2kSZZ6+cKl4so94A85o9Yt l3NUZChJLNpmleudbRfRRU90SizEWNGs0VtadRd1ltN4Hn3anknob4ycYfHmXLfaRTcX K5lQ== X-Received: by 10.236.135.66 with SMTP id t42mr1080464yhi.36.1371632080074; Wed, 19 Jun 2013 01:54:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.5.8 with SMTP id o8ls240313qeo.24.gmail; Wed, 19 Jun 2013 01:54:39 -0700 (PDT) X-Received: by 10.220.91.75 with SMTP id l11mr317514vcm.82.1371632079930; Wed, 19 Jun 2013 01:54:39 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id ra6si6309045vec.8.2013.06.19.01.54.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Jun 2013 01:54:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id lf11so3553215vcb.40 for ; Wed, 19 Jun 2013 01:54:39 -0700 (PDT) X-Received: by 10.58.45.70 with SMTP id k6mr673844vem.9.1371632079824; Wed, 19 Jun 2013 01:54:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp100259veb; Wed, 19 Jun 2013 01:54:39 -0700 (PDT) X-Received: by 10.68.245.200 with SMTP id xq8mr1914654pbc.32.1371632078799; Wed, 19 Jun 2013 01:54:38 -0700 (PDT) Received: from mail-pb0-x22a.google.com (mail-pb0-x22a.google.com [2607:f8b0:400e:c01::22a]) by mx.google.com with ESMTPS id tb9si7565002pbc.99.2013.06.19.01.54.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Jun 2013 01:54:38 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::22a is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=2607:f8b0:400e:c01::22a; Received: by mail-pb0-f42.google.com with SMTP id un1so4844404pbc.29 for ; Wed, 19 Jun 2013 01:54:38 -0700 (PDT) X-Received: by 10.66.183.196 with SMTP id eo4mr5715120pac.156.1371632078241; Wed, 19 Jun 2013 01:54:38 -0700 (PDT) Received: from localhost ([106.198.29.238]) by mx.google.com with ESMTPSA id ri8sm22299617pbc.3.2013.06.19.01.54.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 19 Jun 2013 01:54:37 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, robin.randhawa@arm.com, Steve.Bannister@arm.com, Liviu.Dudau@arm.com, charles.garcia-tobin@arm.com, arvind.chauhan@arm.com, dave.martin@arm.com, Viresh Kumar , Simon Horman Subject: [PATCH 05/13] cpufreq: e_powersave: call CPUFREQ_POSTCHANGE notfier in error cases Date: Wed, 19 Jun 2013 14:22:59 +0530 Message-Id: <859db6d3cfc0efbd5b96783967c10cfcb8b5a51a.1371630975.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQmDtfXDNXY6IJgpemAmGKFenx+p7ug0gN5H1wIWyzcc38mGmFy4l0rUwatEqvAN+4Pg0++n X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , PRECHANGE and POSTCHANGE notifiers must be called in groups, i.e either both should be called or both shouldn't be. In case we have started PRECHANGE notifier and found an error, we must call POSTCHANGE notifier with freqs.new = freqs.old to guarantee that sequence of calling notifiers is complete. This driver was taking care of it but frequency isn't restored to freqs.old. This patch fixes it. Cc: Simon Horman Signed-off-by: Viresh Kumar --- drivers/cpufreq/e_powersaver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c index 37380fb..3d03626 100644 --- a/drivers/cpufreq/e_powersaver.c +++ b/drivers/cpufreq/e_powersaver.c @@ -161,6 +161,9 @@ postchange: current_multiplier); } #endif + if (err) + freqs.new = freqs.old; + cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); return err; }