forked from Minki/linux
net: mdio: ipq8064: replace ioremap() with devm_ioremap()
Use devm_ioremap() instead of ioremap() to avoid iounmap() missing. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d40ce48cb3
commit
2f7ed29f2c
@ -127,7 +127,7 @@ ipq8064_mdio_probe(struct platform_device *pdev)
|
|||||||
if (of_address_to_resource(np, 0, &res))
|
if (of_address_to_resource(np, 0, &res))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
base = ioremap(res.start, resource_size(&res));
|
base = devm_ioremap(&pdev->dev, res.start, resource_size(&res));
|
||||||
if (!base)
|
if (!base)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user