From patchwork Fri Oct 23 16:59:03 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 55592 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9NGxYPs026349 for ; Fri, 23 Oct 2009 16:59:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752727AbZJWQ70 (ORCPT ); Fri, 23 Oct 2009 12:59:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752724AbZJWQ7Z (ORCPT ); Fri, 23 Oct 2009 12:59:25 -0400 Received: from qw-out-2122.google.com ([74.125.92.25]:11746 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752703AbZJWQ7Z (ORCPT ); Fri, 23 Oct 2009 12:59:25 -0400 Received: by qw-out-2122.google.com with SMTP id 9so1391355qwb.37 for ; Fri, 23 Oct 2009 09:59:30 -0700 (PDT) Received: by 10.224.8.3 with SMTP id f3mr5615529qaf.147.1256317170285; Fri, 23 Oct 2009 09:59:30 -0700 (PDT) Received: from localhost ([216.254.16.51]) by mx.google.com with ESMTPS id 8sm8604384qwj.11.2009.10.23.09.59.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 23 Oct 2009 09:59:29 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Kalle Jokiniemi Subject: [PATCH 05/10] OMAP3: PM: CPUidle: fix init sequencing Date: Fri, 23 Oct 2009 09:59:03 -0700 Message-Id: <1256317148-25506-6-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.6.4.3 In-Reply-To: <1256317148-25506-5-git-send-email-khilman@deeprootsystems.com> References: <1256317148-25506-1-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-2-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-3-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-4-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-5-git-send-email-khilman@deeprootsystems.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index b0bee34..ad3af11 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -227,7 +227,7 @@ struct cpuidle_driver omap3_idle_driver = { * Registers the OMAP3 specific cpuidle driver with the cpuidle * framework with the valid set of states. */ -int omap3_idle_init(void) +int __init omap3_idle_init(void) { int i, count = 0; struct omap3_processor_cx *cx; @@ -272,5 +272,9 @@ int omap3_idle_init(void) return 0; } -device_initcall(omap3_idle_init); +#else +int __init omap3_idle_init(void) +{ + return 0; +} #endif /* CONFIG_CPU_IDLE */ diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 379e350..0bf345d 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -21,6 +21,7 @@ extern void omap3_pm_off_mode_enable(int); extern void omap_sram_idle(void); extern int omap3_can_sleep(void); extern int set_pwrdm_state(struct powerdomain *pwrdm, u32 state); +extern int omap3_idle_init(void); extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 67412b8..a6624a1 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -1098,9 +1098,8 @@ static int __init omap3_pm_init(void) suspend_set_ops(&omap_pm_ops); #endif /* CONFIG_SUSPEND */ -#ifndef CONFIG_CPU_IDLE pm_idle = omap3_pm_idle; -#endif + omap3_idle_init(); pwrdm_add_wkdep(neon_pwrdm, mpu_pwrdm); /*