forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
fae04237e8
commit
3c67166dc5
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user