Commit 114df7d6 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Vinod Koul

dma: at_hdmac.c: use resource_size

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 7dab35c0
...@@ -1216,7 +1216,7 @@ static int __init at_dma_probe(struct platform_device *pdev) ...@@ -1216,7 +1216,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
atdma->dma_common.cap_mask = pdata->cap_mask; atdma->dma_common.cap_mask = pdata->cap_mask;
atdma->all_chan_mask = (1 << pdata->nr_channels) - 1; 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)) { if (!request_mem_region(io->start, size, pdev->dev.driver->name)) {
err = -EBUSY; err = -EBUSY;
goto err_kfree; goto err_kfree;
...@@ -1362,7 +1362,7 @@ static int __exit at_dma_remove(struct platform_device *pdev) ...@@ -1362,7 +1362,7 @@ static int __exit at_dma_remove(struct platform_device *pdev)
atdma->regs = NULL; atdma->regs = NULL;
io = platform_get_resource(pdev, IORESOURCE_MEM, 0); 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); kfree(atdma);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment