]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: OMAP: debug-leds: Use resource_size instead of hard coded macro
authorBenoit Cousson <b-cousson@ti.com>
Mon, 12 Nov 2012 10:44:03 +0000 (11:44 +0100)
committerTony Lindgren <tony@atomide.com>
Mon, 12 Nov 2012 21:28:28 +0000 (13:28 -0800)
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 <b-cousson@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/debug-leds.c

index c43ea21f33b4352b07bdfedc206737d3abd71b27..aa7ebc6bcd65275e5d5c85fbaaa79cd07c839953 100644 (file)
@@ -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++) {