Commit 3c67166d authored by Yangtao Li's avatar Yangtao Li Committed by Boris Brezillon

i3c: master: cdns: convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
parent fae04237
......@@ -1564,7 +1564,6 @@ static const struct of_device_id cdns_i3c_master_of_ids[] = {
static int cdns_i3c_master_probe(struct platform_device *pdev)
{
struct cdns_i3c_master *master;
struct resource *res;
int ret, irq;
u32 val;
......@@ -1576,8 +1575,7 @@ static int cdns_i3c_master_probe(struct platform_device *pdev)
if (!master->devdata)
return -EINVAL;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
master->regs = devm_ioremap_resource(&pdev->dev, res);
master->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(master->regs))
return PTR_ERR(master->regs);
......
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