* [PATCH] dma: at_hdmac.c: use resource_size
@ 2011-06-01 22:16 H Hartley Sweeten
2011-06-06 8:15 ` Koul, Vinod
0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2011-06-01 22:16 UTC (permalink / raw)
To: Linux Kernel; +Cc: dan.j.williams, vinod.koul
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
---
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 36144f8..6a483ea 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1216,7 +1216,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;
@@ -1362,7 +1362,7 @@ static int __exit at_dma_remove(struct platform_device *pdev)
atdma->regs = NULL;
io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- release_mem_region(io->start, io->end - io->start + 1);
+ release_mem_region(io->start, resource_size(io));
kfree(atdma);
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] dma: at_hdmac.c: use resource_size
2011-06-01 22:16 [PATCH] dma: at_hdmac.c: use resource_size H Hartley Sweeten
@ 2011-06-06 8:15 ` Koul, Vinod
0 siblings, 0 replies; 2+ messages in thread
From: Koul, Vinod @ 2011-06-06 8:15 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: Linux Kernel, dan.j.williams
On Wed, 2011-06-01 at 15:16 -0700, H Hartley Sweeten wrote:
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Vinod Koul <vinod.koul@intel.com>
>
> ---
>
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index 36144f8..6a483ea 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -1216,7 +1216,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;
> @@ -1362,7 +1362,7 @@ static int __exit at_dma_remove(struct platform_device *pdev)
> atdma->regs = NULL;
>
> io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - release_mem_region(io->start, io->end - io->start + 1);
> + release_mem_region(io->start, resource_size(io));
>
> kfree(atdma);
>
Applied, Thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-06 8:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-01 22:16 [PATCH] dma: at_hdmac.c: use resource_size H Hartley Sweeten
2011-06-06 8:15 ` Koul, Vinod
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®