public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP2+: devices: Fixes for McPDM
@ 2011-11-03  8:41 Peter Ujfalusi
  2011-11-05  0:09 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2011-11-03  8:41 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap, Benoit Cousson, Kevin Hilman

Clean up the omap-mcpdm init function since this part comes via sound
tree, and there has been changes regarding to hwmod/omap_device_build.

Missed patches:
The ARM: OMAP2+: devices: Remove all omap_device_pm_latency structures
OMAP: omap_device: when building return platform_device instead of
omap_device

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Benoit Cousson <b-cousson@ti.com>
CC: Kevin Hilman <khilman@ti.com>
---
 arch/arm/mach-omap2/devices.c |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 68ec031..c15cfad 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -318,18 +318,10 @@ static inline void omap_init_audio(void) {}
 #if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
 		defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
 
-static struct omap_device_pm_latency omap_mcpdm_latency[] = {
-	{
-		.deactivate_func = omap_device_idle_hwmods,
-		.activate_func = omap_device_enable_hwmods,
-		.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
-	},
-};
-
 static void omap_init_mcpdm(void)
 {
 	struct omap_hwmod *oh;
-	struct omap_device *od;
+	struct platform_device *pdev;
 
 	oh = omap_hwmod_lookup("mcpdm");
 	if (!oh) {
@@ -337,11 +329,8 @@ static void omap_init_mcpdm(void)
 		return;
 	}
 
-	od = omap_device_build("omap-mcpdm", -1, oh, NULL, 0,
-				omap_mcpdm_latency,
-				ARRAY_SIZE(omap_mcpdm_latency), 0);
-	if (IS_ERR(od))
-		printk(KERN_ERR "Could not build omap_device for omap-mcpdm-dai\n");
+	pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0, NULL, 0, 0);
+	WARN(IS_ERR(pdev), "Can't build omap_device for omap-mcpdm.\n");
 }
 #else
 static inline void omap_init_mcpdm(void) {}
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: OMAP2+: devices: Fixes for McPDM
  2011-11-03  8:41 [PATCH] ARM: OMAP2+: devices: Fixes for McPDM Peter Ujfalusi
@ 2011-11-05  0:09 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2011-11-05  0:09 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: linux-omap, Benoit Cousson, Kevin Hilman

* Peter Ujfalusi <peter.ujfalusi@ti.com> [111103 01:07]:
> Clean up the omap-mcpdm init function since this part comes via sound
> tree, and there has been changes regarding to hwmod/omap_device_build.
> 
> Missed patches:
> The ARM: OMAP2+: devices: Remove all omap_device_pm_latency structures
> OMAP: omap_device: when building return platform_device instead of
> omap_device

Applying into fixes with comments updated as below.

Tony


From: Peter Ujfalusi <peter.ujfalusi@ti.com>
Date: Thu, 3 Nov 2011 10:41:22 +0200
Subject: [PATCH] ARM: OMAP2+: devices: Fixes for McPDM

Commit f718e2c034bf6ff872106344935006230764cb12 (ARM: OMAP2+: devices:
Remove all omap_device_pm_latency structures) removed these structures.
Commit 3528c58eb9e818b7821501afa2916eb12131994a (OMAP: omap_device:
when building return platform_device instead of omap_device) now
returns platform_device instead of omap_device.

Fix up the omap-mcpdm init function since this part comes via sound
tree, and there has been changes regarding to hwmod/omap_device_build.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Benoit Cousson <b-cousson@ti.com>
CC: Kevin Hilman <khilman@ti.com>
[tony@atomide.com: updated comments]
Signed-off-by: Tony Lindgren <tony@atomide.com>

--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -318,18 +318,10 @@ static inline void omap_init_audio(void) {}
 #if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
 		defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
 
-static struct omap_device_pm_latency omap_mcpdm_latency[] = {
-	{
-		.deactivate_func = omap_device_idle_hwmods,
-		.activate_func = omap_device_enable_hwmods,
-		.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
-	},
-};
-
 static void omap_init_mcpdm(void)
 {
 	struct omap_hwmod *oh;
-	struct omap_device *od;
+	struct platform_device *pdev;
 
 	oh = omap_hwmod_lookup("mcpdm");
 	if (!oh) {
@@ -337,11 +329,8 @@ static void omap_init_mcpdm(void)
 		return;
 	}
 
-	od = omap_device_build("omap-mcpdm", -1, oh, NULL, 0,
-				omap_mcpdm_latency,
-				ARRAY_SIZE(omap_mcpdm_latency), 0);
-	if (IS_ERR(od))
-		printk(KERN_ERR "Could not build omap_device for omap-mcpdm-dai\n");
+	pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0, NULL, 0, 0);
+	WARN(IS_ERR(pdev), "Can't build omap_device for omap-mcpdm.\n");
 }
 #else
 static inline void omap_init_mcpdm(void) {}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-05  0:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-03  8:41 [PATCH] ARM: OMAP2+: devices: Fixes for McPDM Peter Ujfalusi
2011-11-05  0:09 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox