All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio-vr41xx: Convert use of struct resource to resource_size(ptr)
@ 2011-06-11  1:16 Joe Perches
  2011-06-11  5:48 ` Grant Likely
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2011-06-11  1:16 UTC (permalink / raw)
  To: Grant Likely; +Cc: Jiri Kosina, linux-kernel

Remove miscellaneous use of direct calculation by using resource_size().

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/gpio/gpio-vr41xx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
index a365be0..98723cb 100644
--- a/drivers/gpio/gpio-vr41xx.c
+++ b/drivers/gpio/gpio-vr41xx.c
@@ -518,7 +518,7 @@ static int __devinit giu_probe(struct platform_device *pdev)
 	if (!res)
 		return -EBUSY;
 
-	giu_base = ioremap(res->start, res->end - res->start + 1);
+	giu_base = ioremap(res->start, resource_size(res));
 	if (!giu_base)
 		return -ENOMEM;
 
-- 
1.7.6.rc1


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

* Re: [PATCH] gpio-vr41xx: Convert use of struct resource to resource_size(ptr)
  2011-06-11  1:16 [PATCH] gpio-vr41xx: Convert use of struct resource to resource_size(ptr) Joe Perches
@ 2011-06-11  5:48 ` Grant Likely
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2011-06-11  5:48 UTC (permalink / raw)
  To: Joe Perches; +Cc: Jiri Kosina, linux-kernel

On Fri, Jun 10, 2011 at 06:16:15PM -0700, Joe Perches wrote:
> Remove miscellaneous use of direct calculation by using resource_size().
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Merged, thanks.
g.

> ---
>  drivers/gpio/gpio-vr41xx.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
> index a365be0..98723cb 100644
> --- a/drivers/gpio/gpio-vr41xx.c
> +++ b/drivers/gpio/gpio-vr41xx.c
> @@ -518,7 +518,7 @@ static int __devinit giu_probe(struct platform_device *pdev)
>  	if (!res)
>  		return -EBUSY;
>  
> -	giu_base = ioremap(res->start, res->end - res->start + 1);
> +	giu_base = ioremap(res->start, resource_size(res));
>  	if (!giu_base)
>  		return -ENOMEM;
>  
> -- 
> 1.7.6.rc1
> 

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

end of thread, other threads:[~2011-06-11  5:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-11  1:16 [PATCH] gpio-vr41xx: Convert use of struct resource to resource_size(ptr) Joe Perches
2011-06-11  5:48 ` Grant Likely

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.