diff options
author | Zhang Qilong <zhangqilong3@huawei.com> | 2020-09-21 12:37:01 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-10-05 07:43:47 +0300 |
commit | ea275007c9473a7be66a47e0823482f6bd8aacd0 (patch) | |
tree | e16b2f1fbef19fd9e82ec5bf85940d3ee5c76668 /drivers/dma/ti | |
parent | 0395f869f685c256822c5041750e6e130a16ec1b (diff) | |
download | linux-ea275007c9473a7be66a47e0823482f6bd8aacd0.tar.xz |
dmaengine: ti: k3-udma: use devm_platform_ioremap_resource_byname
Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200921093701.102208-1-zhangqilong3@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/ti')
-rw-r--r-- | drivers/dma/ti/k3-udma.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index 3ce0eb2dfa22..82cf6c77f5c9 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -3157,13 +3157,10 @@ static const struct soc_device_attribute k3_soc_devices[] = { static int udma_get_mmrs(struct platform_device *pdev, struct udma_dev *ud) { - struct resource *res; int i; for (i = 0; i < MMR_LAST; i++) { - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - mmr_names[i]); - ud->mmrs[i] = devm_ioremap_resource(&pdev->dev, res); + ud->mmrs[i] = devm_platform_ioremap_resource_byname(pdev, mmr_names[i]); if (IS_ERR(ud->mmrs[i])) return PTR_ERR(ud->mmrs[i]); } |