[RFC/PATCH 3/8] omap: mailbox: 2420 should be detected at run-time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 arch/arm/mach-omap2/mailbox.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 252e53b..a328664 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -287,8 +287,6 @@ struct omap_mbox mbox_dsp_info = {
 };
 EXPORT_SYMBOL(mbox_dsp_info);
 
-#if defined(CONFIG_ARCH_OMAP2420)
-
 /* IVA */
 static struct omap_mbox2_priv omap2_mbox_iva_priv = {
 	.tx_fifo = {
@@ -311,7 +309,6 @@ static struct omap_mbox mbox_iva_info = {
 	.ops	= &omap2_mbox_ops,
 	.priv	= &omap2_mbox_iva_priv,
 };
-#endif
 
 /* OMAP4 */
 static struct omap_mbox2_priv omap2_mbox_1_priv = {
@@ -401,7 +398,6 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
 			goto err_dsp;
 		}
 	}
-#if defined(CONFIG_ARCH_OMAP2420) /* IVA */
 	if (cpu_is_omap2420()) {
 		/* IVA IRQ */
 		res = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
@@ -415,13 +411,10 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
 		if (ret)
 			goto err_iva1;
 	}
-#endif
 	return 0;
 
-#if defined(CONFIG_ARCH_OMAP2420) /* IVA */
 err_iva1:
 	omap_mbox_unregister(&mbox_dsp_info);
-#endif
 
 err_dsp:
 	iounmap(mbox_base);
@@ -430,9 +423,8 @@ err_dsp:
 
 static int __devexit omap2_mbox_remove(struct platform_device *pdev)
 {
-#if defined(CONFIG_ARCH_OMAP2420)
-	omap_mbox_unregister(&mbox_iva_info);
-#endif
+	if (cpu_is_omap2420())
+		omap_mbox_unregister(&mbox_iva_info);
 
 	if (cpu_is_omap44xx()) {
 		omap_mbox_unregister(&mbox_2_info);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux