instead of hardcoding the address space size, we
can calculate it using resource_size() helper.

Signed-off-by: Felipe Balbi <[email protected]>
---
 arch/arm/plat-omap/debug-leds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c
index 08fbb85..ebc0317 100644
--- a/arch/arm/plat-omap/debug-leds.c
+++ b/arch/arm/plat-omap/debug-leds.c
@@ -272,7 +272,7 @@ static int __devinit 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(~0, &fpga->leds);
 
 #ifdef CONFIG_LEDS
-- 
1.7.11

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