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 <b-cousson@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
committed by
Tony Lindgren
parent
edf8dde393
commit
8de7e37ef0
@@ -111,7 +111,7 @@ static int fpga_probe(struct platform_device *pdev)
|
|||||||
if (!iomem)
|
if (!iomem)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
fpga = ioremap(iomem->start, H2P2_DBG_FPGA_SIZE);
|
fpga = ioremap(iomem->start, resource_size(iomem));
|
||||||
__raw_writew(0xff, &fpga->leds);
|
__raw_writew(0xff, &fpga->leds);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(dbg_leds); i++) {
|
for (i = 0; i < ARRAY_SIZE(dbg_leds); i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user