From patchwork Sun Jun 5 13:31:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 849792 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p55Drng1010084 for ; Sun, 5 Jun 2011 13:53:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754079Ab1FENxp (ORCPT ); Sun, 5 Jun 2011 09:53:45 -0400 Received: from d1.icnet.pl ([212.160.220.21]:33551 "EHLO d1.icnet.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340Ab1FENxp (ORCPT ); Sun, 5 Jun 2011 09:53:45 -0400 Received: from 87-205-12-81.ip.netia.com.pl ([87.205.12.81] helo=vclass.localnet) by d1.icnet.pl with asmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1QTDls-0002GO-43; Sun, 05 Jun 2011 15:53:40 +0200 From: Janusz Krzysztofik Organization: Tele-Info-System, Poznan, PL To: linux-pm@lists.linux-foundation.org Subject: [PATCH 3.0-rc1] PM / runtime: fix broken iteration over clock ids Date: Sun, 5 Jun 2011 15:31:12 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.36-gentoo-r5; KDE/4.4.5; i686; ; ) Cc: "Rafael J. Wysocki" , Pavel Machek , Len Brown , "Greg Kroah-Hartman" , linux-kernel@vger.kernel.org, "linux-omap@vger.kernel.org" MIME-Version: 1.0 Message-Id: <201106051531.32878.jkrzyszt@tis.icnet.pl> X-SA-Exim-Scanned: No (on d1.icnet); SAEximRunCond expanded to false Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 05 Jun 2011 13:53:49 +0000 (UTC) In its current form, pm_runtime_clk_notify() iterates through sub- strings of pm_clk_notifier_block.con_ids[0] rather than consecutive pm_clk_notifier_block.con_ids[] elements. As a noticeable result, McBSP1 port no longer worked for me on updated arch/arm/mach-omap1/pm_bus.c (commit 600b776eb39a13a28b090ba9efceb0c69d4508aa, "OMAP1 / PM: Use generic clock manipulation routines for runtime PM"), not being able to activate "fck" when required. Tested on Amstrad Delta. Signed-off-by: Janusz Krzysztofik --- drivers/base/power/clock_ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- git/drivers/base/power/clock_ops.c.orig 2011-05-30 22:16:35.000000000 +0200 +++ git/drivers/base/power/clock_ops.c 2011-06-05 15:19:55.000000000 +0200 @@ -291,7 +291,7 @@ static int pm_runtime_clk_notify(struct { struct pm_clk_notifier_block *clknb; struct device *dev = data; - char *con_id; + char **con_id; int error; dev_dbg(dev, "%s() %ld\n", __func__, action); @@ -309,8 +309,8 @@ static int pm_runtime_clk_notify(struct dev->pwr_domain = clknb->pwr_domain; if (clknb->con_ids[0]) { - for (con_id = clknb->con_ids[0]; *con_id; con_id++) - pm_runtime_clk_add(dev, con_id); + for (con_id = &clknb->con_ids[0]; *con_id; con_id++) + pm_runtime_clk_add(dev, *con_id); } else { pm_runtime_clk_add(dev, NULL); }