Skip to content

Commit

Permalink
i3c: master: cdns: convert to devm_platform_ioremap_resource
Browse files Browse the repository at this point in the history
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
  • Loading branch information
TinyWindzz authored and bbrezillon committed Jan 13, 2020
1 parent fae0423 commit 3c67166
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/i3c/master/i3c-master-cdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);

Expand Down

0 comments on commit 3c67166

Please sign in to comment.