[v4,06/14] dmaengine: tegra-apb: Use devm_platform_ioremap_resource
diff mbox series

Message ID 20200112173006.29863-7-digetx@gmail.com
State Changes Requested
Headers show
Series
  • NVIDIA Tegra APB DMA driver fixes and improvements
Related show

Commit Message

Dmitry Osipenko Jan. 12, 2020, 5:29 p.m. UTC
Use devm_platform_ioremap_resource to keep code cleaner a tad.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/dma/tegra20-apb-dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jon Hunter Jan. 14, 2020, 3:44 p.m. UTC | #1
On 12/01/2020 17:29, Dmitry Osipenko wrote:
> Use devm_platform_ioremap_resource to keep code cleaner a tad.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/dma/tegra20-apb-dma.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
> index aafad50d075e..f44291207928 100644
> --- a/drivers/dma/tegra20-apb-dma.c
> +++ b/drivers/dma/tegra20-apb-dma.c
> @@ -1402,8 +1402,7 @@ static int tegra_dma_probe(struct platform_device *pdev)
>  	tdma->chip_data = cdata;
>  	platform_set_drvdata(pdev, tdma);
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	tdma->base_addr = devm_ioremap_resource(&pdev->dev, res);
> +	tdma->base_addr = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(tdma->base_addr))
>  		return PTR_ERR(tdma->base_addr);
>  

Acked-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon

Patch
diff mbox series

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index aafad50d075e..f44291207928 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1402,8 +1402,7 @@  static int tegra_dma_probe(struct platform_device *pdev)
 	tdma->chip_data = cdata;
 	platform_set_drvdata(pdev, tdma);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	tdma->base_addr = devm_ioremap_resource(&pdev->dev, res);
+	tdma->base_addr = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(tdma->base_addr))
 		return PTR_ERR(tdma->base_addr);