Re: [PATCH 15/20] Use platform device to get DSS base addr

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

 



On 8/23/2010 5:58 PM, Guruswamy, Senthilvadivu wrote:
From: Senthilvadivu Guruswamy<svadivu@xxxxxx>

DSS Base addr got form platform device. Hardcoding of base addr could be removed.

Signed-off-by: Senthilvadivu Guruswamy<svadivu@xxxxxx>
---
  drivers/video/omap2/dss/dss.c |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index cbad9ff..21005c6 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -973,8 +973,10 @@ int dss_init(bool skip_init)
  {
  	int r;
  	u32 rev;
+	struct resource *dss_mem;

-	dss.base = ioremap(DSS_BASE, DSS_SZ_REGS);
+	dss_mem = platform_get_resource(dss.pdev, IORESOURCE_MEM, 0);

platform_get_resource can fail, so you have to check the returned value.
Please note that this comment applies as well to all the other patches from 16 to 19.

Benoit

+	dss.base = ioremap(dss_mem->start, resource_size(dss_mem));
  	if (!dss.base) {
  		DSSERR("can't ioremap DSS\n");
  		r = -ENOMEM;

--
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