public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] at_hdmac.c: use resource_size()
@ 2009-12-11  1:29 H Hartley Sweeten
  2009-12-11  9:02 ` Nicolas Ferre
  0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2009-12-11  1:29 UTC (permalink / raw)
  To: kernel list; +Cc: nicolas.ferre

Use resource_size() for ioremap.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
---

diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index c52ac9e..e16057b 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1012,7 +1012,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
 	atdma->dma_common.cap_mask = pdata->cap_mask;
 	atdma->all_chan_mask = (1 << pdata->nr_channels) - 1;
 
-	size = io->end - io->start + 1;
+	size = resource_size(io);
 	if (!request_mem_region(io->start, size, pdev->dev.driver->name)) {
 		err = -EBUSY;
 		goto err_kfree; 

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

* Re: [PATCH] at_hdmac.c: use resource_size()
  2009-12-11  1:29 [PATCH] at_hdmac.c: use resource_size() H Hartley Sweeten
@ 2009-12-11  9:02 ` Nicolas Ferre
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Ferre @ 2009-12-11  9:02 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: kernel list

H Hartley Sweeten :
> Use resource_size() for ioremap.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> ---
> 
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index c52ac9e..e16057b 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -1012,7 +1012,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
>  	atdma->dma_common.cap_mask = pdata->cap_mask;
>  	atdma->all_chan_mask = (1 << pdata->nr_channels) - 1;
>  
> -	size = io->end - io->start + 1;
> +	size = resource_size(io);
>  	if (!request_mem_region(io->start, size, pdev->dev.driver->name)) {
>  		err = -EBUSY;
>  		goto err_kfree; 
> 


-- 
Nicolas Ferre


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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11  1:29 [PATCH] at_hdmac.c: use resource_size() H Hartley Sweeten
2009-12-11  9:02 ` Nicolas Ferre

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