public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds-cobalt: use resource_size()
@ 2009-11-25  4:33 Yoichi Yuasa
  2009-11-25  9:41 ` Florian Fainelli
  0 siblings, 1 reply; 2+ messages in thread
From: Yoichi Yuasa @ 2009-11-25  4:33 UTC (permalink / raw)
  To: Richard Purdie; +Cc: yuasa, Florian Fainelli, Andrew Morton, linux-kernel


Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: Florian Fainelli <florian@openwrt.org>
---
 drivers/leds/leds-cobalt-qube.c |    2 +-
 drivers/leds/leds-cobalt-raq.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/leds-cobalt-qube.c b/drivers/leds/leds-cobalt-qube.c
index 8816806..de19753 100644
--- a/drivers/leds/leds-cobalt-qube.c
+++ b/drivers/leds/leds-cobalt-qube.c
@@ -43,7 +43,7 @@ static int __devinit cobalt_qube_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;
 
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;
 
-- 
1.6.5.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] leds-cobalt: use resource_size()
  2009-11-25  4:33 [PATCH] leds-cobalt: use resource_size() Yoichi Yuasa
@ 2009-11-25  9:41 ` Florian Fainelli
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2009-11-25  9:41 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: Richard Purdie, Andrew Morton, linux-kernel

Hi Yoichi,

On Wednesday 25 November 2009 05:33:59 Yoichi Yuasa wrote:
> Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
> Cc: Florian Fainelli <florian@openwrt.org>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>  drivers/leds/leds-cobalt-qube.c |    2 +-
>  drivers/leds/leds-cobalt-raq.c  |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/leds/leds-cobalt-qube.c
>  b/drivers/leds/leds-cobalt-qube.c index 8816806..de19753 100644
> --- a/drivers/leds/leds-cobalt-qube.c
> +++ b/drivers/leds/leds-cobalt-qube.c
> @@ -43,7 +43,7 @@ static int __devinit cobalt_qube_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;
> 
> 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;
> 

-- 
--
WBR, Florian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-25  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25  4:33 [PATCH] leds-cobalt: use resource_size() Yoichi Yuasa
2009-11-25  9:41 ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox