From: Senthilvadivu Guruswamy <[email protected]>

DISPC Base addr got from the platform device.  Hadrcoding of base
addr removed.

Signed-off-by: Senthilvadivu Guruswamy <[email protected]>
---
 drivers/video/omap2/dss/dispc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index ae18b5f..8a7a086 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -40,7 +40,6 @@
 #include "dss.h"
 
 /* DISPC */
-#define DISPC_BASE                     0x48050400
 
 #define DISPC_SZ_REGS                  SZ_1K
 
@@ -3094,6 +3093,7 @@ static void _omap_dispc_initial_config(void)
 int dispc_init(struct platform_device *pdev)
 {
        u32 rev;
+       struct resource *dispc_mem;
 
        spin_lock_init(&dispc.irq_lock);
 
@@ -3104,7 +3104,8 @@ int dispc_init(struct platform_device *pdev)
 
        INIT_WORK(&dispc.error_work, dispc_error_worker);
 
-       dispc.base = ioremap(DISPC_BASE, DISPC_SZ_REGS);
+       dispc_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       dispc.base = ioremap(dispc_mem->start, resource_size(dispc_mem));
        if (!dispc.base) {
                DSSERR("can't ioremap DISPC\n");
                return -ENOMEM;
-- 
1.6.3.3

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

Reply via email to