From f729055074bf6bb0f1c87d92de89ab69c9aad220 Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Thu, 6 Nov 2008 04:08:44 -0700 Subject: [PATCH] OMAP3 powerdomains: remove RET from SGX power states list MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On Wed, 5 Nov 2008, Tony Lindgren wrote: > * Paul Walmsley [081105 11:39]: > > > > The SGX device on OMAP3 does not support retention, so remove RET from the > > list of possible SGX power states. Problem debugged by Richard Woodruff > > . > > Pushing. Just FYI, that patch prevents the kernel from booting due to a bug in pm34xx.c; patch below. Even with the follwoing patch, the initial power state setup code in pm34xx.c will bail out early since it still tries to set the SGX next power state to retention, which it does not support. - Paul OMAP3 PM: use list_for_each_entry_safe() when deleting list entries From: Paul Walmsley The error path in clkdms_setup() needs to use list_for_each_entry_safe() when deleting entries from the list, or the kernel will crash. Signed-off-by: Paul Walmsley Cc: Jouni Högander Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/pm34xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index a11a6573b12..da098d24d13 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -540,7 +540,7 @@ static int __init clkdms_setup(struct clockdomain *clkdm) int __init omap3_pm_init(void) { - struct power_state *pwrst; + struct power_state *pwrst, *tmp; int ret; printk(KERN_ERR "Power Management for TI OMAP3.\n"); @@ -583,7 +583,7 @@ err1: return ret; err2: free_irq(INT_34XX_PRCM_MPU_IRQ, NULL); - list_for_each_entry(pwrst, &pwrst_list, node) { + list_for_each_entry_safe(pwrst, tmp, &pwrst_list, node) { list_del(&pwrst->node); kfree(pwrst); } -- 2.41.0