board-msm7x27a:wlan: Updates to AR6003 PM device registration.

AR6003 chip should be powered on before SDC2 resume is called in
suspend/resume scenarios for that registering AR6003 PM device before SDC2
ensures that power management framework always calls ar6000pm resume before
SDC2 resume as the suspend/resume calls are serialized

Signed-off-by: Santosh Sajjan <ssajjan@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm7x27a.c b/arch/arm/mach-msm/board-msm7x27a.c
index e3915c2..9fc69fa 100644
--- a/arch/arm/mach-msm/board-msm7x27a.c
+++ b/arch/arm/mach-msm/board-msm7x27a.c
@@ -2546,9 +2546,6 @@
 #ifdef CONFIG_BT
 	&msm_bt_power_device,
 #endif
-#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
-	&msm_wlan_ar6000_pm_device,
-#endif
 	&asoc_msm_pcm,
 	&asoc_msm_dai0,
 	&asoc_msm_dai1,
@@ -3190,12 +3187,24 @@
 
 #define LED_GPIO_PDM		96
 #define UART1DM_RX_GPIO		45
+
+#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
+static int __init msm7x27a_init_ar6000pm(void)
+{
+	return platform_device_register(&msm_wlan_ar6000_pm_device);
+}
+#else
+static int __init msm7x27a_init_ar6000pm(void) { return 0; }
+#endif
+
 static void __init msm7x2x_init(void)
 {
 	msm7x2x_misc_init();
 
 	/* Common functions for SURF/FFA/RUMI3 */
 	msm_device_i2c_init();
+	/* Ensure ar6000pm device is registered before MMC/SDC */
+	msm7x27a_init_ar6000pm();
 	msm7x27a_init_mmc();
 	msm7x27a_init_ebi2();
 	msm7x27a_cfg_uart2dm_serial();