Skip to content

Commit 9f60d9d

Browse files
Yang Linmenon
authored andcommitted
soc: ti: smartreflex: Use devm_platform_ioremap_resource()
Convert platform_get_resource(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Link: https://lore.kernel.org/r/20230428062825.126448-1-yang.lee@linux.alibaba.com Signed-off-by: Nishanth Menon <nm@ti.com>
1 parent ac9a786 commit 9f60d9d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/soc/ti/smartreflex.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,6 @@ static int omap_sr_probe(struct platform_device *pdev)
815815
{
816816
struct omap_sr *sr_info;
817817
struct omap_sr_data *pdata = pdev->dev.platform_data;
818-
struct resource *mem;
819818
struct dentry *nvalue_dir;
820819
int i, ret = 0;
821820

@@ -835,8 +834,7 @@ static int omap_sr_probe(struct platform_device *pdev)
835834
return -EINVAL;
836835
}
837836

838-
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
839-
sr_info->base = devm_ioremap_resource(&pdev->dev, mem);
837+
sr_info->base = devm_platform_ioremap_resource(pdev, 0);
840838
if (IS_ERR(sr_info->base))
841839
return PTR_ERR(sr_info->base);
842840

0 commit comments

Comments
 (0)