linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd/htc-egpio: fix iomem resource handling using resource_size
@ 2009-01-31 20:47 Philipp Zabel
  2009-02-06 14:03 ` Samuel Ortiz
  0 siblings, 1 reply; 2+ messages in thread
From: Philipp Zabel @ 2009-01-31 20:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: Samuel Ortiz, Philipp Zabel

Fixes an off-by-one error in the iomem resource mapping.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
---
 drivers/mfd/htc-egpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c
index 1a4d046..e9b0745 100644
--- a/drivers/mfd/htc-egpio.c
+++ b/drivers/mfd/htc-egpio.c
@@ -286,7 +286,7 @@ static int __init egpio_probe(struct platform_device *pdev)
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res)
 		goto fail;
-	ei->base_addr = ioremap_nocache(res->start, res->end - res->start);
+	ei->base_addr = ioremap_nocache(res->start, resource_size(res));
 	if (!ei->base_addr)
 		goto fail;
 	pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);
-- 
1.5.6.5


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

* Re: [PATCH] mfd/htc-egpio: fix iomem resource handling using resource_size
  2009-01-31 20:47 [PATCH] mfd/htc-egpio: fix iomem resource handling using resource_size Philipp Zabel
@ 2009-02-06 14:03 ` Samuel Ortiz
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2009-02-06 14:03 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: linux-kernel

On Sat, Jan 31, 2009 at 09:47:43PM +0100, Philipp Zabel wrote:
> Fixes an off-by-one error in the iomem resource mapping.
Applied to my for-linus branch. Will Send a pull request to Linus soon.
Thanks a lot.

Cheers,
Samuel.

 
> Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
> ---
>  drivers/mfd/htc-egpio.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c
> index 1a4d046..e9b0745 100644
> --- a/drivers/mfd/htc-egpio.c
> +++ b/drivers/mfd/htc-egpio.c
> @@ -286,7 +286,7 @@ static int __init egpio_probe(struct platform_device *pdev)
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	if (!res)
>  		goto fail;
> -	ei->base_addr = ioremap_nocache(res->start, res->end - res->start);
> +	ei->base_addr = ioremap_nocache(res->start, resource_size(res));
>  	if (!ei->base_addr)
>  		goto fail;
>  	pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);
> -- 
> 1.5.6.5
> 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

end of thread, other threads:[~2009-02-06 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-31 20:47 [PATCH] mfd/htc-egpio: fix iomem resource handling using resource_size Philipp Zabel
2009-02-06 14:03 ` Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).