summaryrefslogtreecommitdiffstats
path: root/drivers/i3c
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2019-12-28 19:54:06 +0100
committerBoris Brezillon <boris.brezillon@collabora.com>2020-01-13 09:48:46 +0100
commit3c67166dc58d02c5166193138f0740e3c322ec35 (patch)
tree080c7379f86ef7a60b2c1509bb82e78ebe51a547 /drivers/i3c
parenti3c: master: dw: convert to devm_platform_ioremap_resource (diff)
downloadlinux-3c67166dc58d02c5166193138f0740e3c322ec35.tar.xz
linux-3c67166dc58d02c5166193138f0740e3c322ec35.zip
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')
-rw-r--r--drivers/i3c/master/i3c-master-cdns.c4
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);