From: Benoit Cousson Date: Mon, 12 Nov 2012 10:44:03 +0000 (+0100) Subject: ARM: OMAP: debug-leds: Use resource_size instead of hard coded macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8de7e37ef0ad7b4dc39498824c48bde2f4d13828;p=openwrt%2Fstaging%2Fblogic.git ARM: OMAP: debug-leds: Use resource_size instead of hard coded macro The debug-leds driver should not rely on hard coded macro for the iomem size but use the resource size instead. Signed-off-by: Benoit Cousson Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c index c43ea21f33b4..aa7ebc6bcd65 100644 --- a/arch/arm/plat-omap/debug-leds.c +++ b/arch/arm/plat-omap/debug-leds.c @@ -111,7 +111,7 @@ static int fpga_probe(struct platform_device *pdev) if (!iomem) return -ENODEV; - fpga = ioremap(iomem->start, H2P2_DBG_FPGA_SIZE); + fpga = ioremap(iomem->start, resource_size(iomem)); __raw_writew(0xff, &fpga->leds); for (i = 0; i < ARRAY_SIZE(dbg_leds); i++) {