diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-28 18:54:06 +0000 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@collabora.com> | 2020-01-13 09:48:46 +0100 |
commit | 3c67166dc58d02c5166193138f0740e3c322ec35 (patch) | |
tree | 080c7379f86ef7a60b2c1509bb82e78ebe51a547 /drivers/i3c/master | |
parent | fae04237e8b1a5efb675b9b442348d002c10389c (diff) |
i3c: master: cdns: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Diffstat (limited to 'drivers/i3c/master')
-rw-r--r-- | drivers/i3c/master/i3c-master-cdns.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c index eed2e4fa299c..54712793709e 100644 --- a/drivers/i3c/master/i3c-master-cdns.c +++ b/drivers/i3c/master/i3c-master-cdns.c @@ -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); |