Skip to content

Commit ea27500

Browse files
Zhang Qilongvinodkoul
authored andcommitted
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 <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 0395f86 commit ea27500

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/dma/ti/k3-udma.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3157,13 +3157,10 @@ static const struct soc_device_attribute k3_soc_devices[] = {
31573157

31583158
static int udma_get_mmrs(struct platform_device *pdev, struct udma_dev *ud)
31593159
{
3160-
struct resource *res;
31613160
int i;
31623161

31633162
for (i = 0; i < MMR_LAST; i++) {
3164-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
3165-
mmr_names[i]);
3166-
ud->mmrs[i] = devm_ioremap_resource(&pdev->dev, res);
3163+
ud->mmrs[i] = devm_platform_ioremap_resource_byname(pdev, mmr_names[i]);
31673164
if (IS_ERR(ud->mmrs[i]))
31683165
return PTR_ERR(ud->mmrs[i]);
31693166
}

0 commit comments

Comments
 (0)