[PATCH] leds-cobalt-raq.c: use resource_size()

[PATCH] leds-cobalt-raq.c: use resource_size()

Post by H Hartley » Sun, 13 Dec 2009 08:20:02


Use resource_size() for ioremap.

Signed-off-by: H Hartley Sweeten < XXXX@XXXXX.COM >
Cc: Richard Purdie < XXXX@XXXXX.COM >
Cc: Greg Kroah-Hartman < XXXX@XXXXX.COM >

---

diff --git a/drivers/leds/leds-cobalt-raq.c b/drivers/leds/leds-cobalt-raq.c
index defc212..438d483 100644
--- a/drivers/leds/leds-cobalt-raq.c
+++ b/drivers/leds/leds-cobalt-raq.c
@@ -84,7 +84,7 @@ static int __devinit cobalt_raq_led_probe(struct platform_device *pdev)
if (!res)
return -EBUSY;

- led_port = ioremap(res->start, res->end - res->start + 1);
+ led_port = ioremap(res->start, resource_size(res));
if (!led_port)
return -ENOMEM;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/