From: Senthilvadivu Guruswamy <[email protected]>

VENC base addr got from platform device.  Hardcoding
of base addr removed.

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

diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 576f0df..e618b09 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -39,7 +39,6 @@
 
 #include "dss.h"
 
-#define VENC_BASE      0x48050C00
 
 /* Venc registers */
 #define VENC_REV_ID                            0x00
@@ -659,13 +658,15 @@ struct regulator *dss_get_vdda_dac(void)
 int venc_init(struct platform_device *pdev)
 {
        u8 rev_id;
+       struct resource *venc_mem;
 
        mutex_init(&venc.venc_lock);
 
        venc.pdev = pdev;
        venc.wss_data = 0;
 
-       venc.base = ioremap(VENC_BASE, SZ_1K);
+       venc_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       venc.base = ioremap(venc_mem->start, resource_size(venc_mem));
        if (!venc.base) {
                DSSERR("can't ioremap VENC\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