diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-10-16 21:57:35 +0800 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2019-10-23 13:20:28 +0530 |
commit | fa093440142d3d25d619580373bb40e9653a203a (patch) | |
tree | ca5994468ca6f258bd44100012c27205b351ce61 /drivers/phy/hisilicon/phy-hisi-inno-usb2.c | |
parent | c9dfadeee89d4c5d335969356c4e63e9b279d038 (diff) | |
download | lwn-fa093440142d3d25d619580373bb40e9653a203a.tar.gz lwn-fa093440142d3d25d619580373bb40e9653a203a.zip |
phy: hisilicon: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/hisilicon/phy-hisi-inno-usb2.c')
-rw-r--r-- | drivers/phy/hisilicon/phy-hisi-inno-usb2.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/phy/hisilicon/phy-hisi-inno-usb2.c b/drivers/phy/hisilicon/phy-hisi-inno-usb2.c index 9b16f13b5ab2..34a6a9a1ceb2 100644 --- a/drivers/phy/hisilicon/phy-hisi-inno-usb2.c +++ b/drivers/phy/hisilicon/phy-hisi-inno-usb2.c @@ -114,7 +114,6 @@ static int hisi_inno_phy_probe(struct platform_device *pdev) struct hisi_inno_phy_priv *priv; struct phy_provider *provider; struct device_node *child; - struct resource *res; int i = 0; int ret; @@ -122,8 +121,7 @@ static int hisi_inno_phy_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->mmio = devm_ioremap_resource(dev, res); + priv->mmio = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->mmio)) { ret = PTR_ERR(priv->mmio); return ret; |