summaryrefslogtreecommitdiff
path: root/drivers/phy/rockchip/phy-rockchip-snps-pcie3.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-09-14 21:37:28 +0800
committerVinod Koul <vkoul@kernel.org>2022-09-20 11:57:24 +0530
commit8b8934ac6de5da734ebe1b693cc475d11515888f (patch)
tree87009131650b2acbd5512dbaa5fcf25c875d8628 /drivers/phy/rockchip/phy-rockchip-snps-pcie3.c
parentc4c349be07aeec5f397a349046dc5fc0f2657691 (diff)
downloadlwn-8b8934ac6de5da734ebe1b693cc475d11515888f.tar.gz
lwn-8b8934ac6de5da734ebe1b693cc475d11515888f.zip
phy: rockchip-snps-pcie3: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220914133728.3781160-1-yangyingliang@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/rockchip/phy-rockchip-snps-pcie3.c')
-rw-r--r--drivers/phy/rockchip/phy-rockchip-snps-pcie3.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/phy/rockchip/phy-rockchip-snps-pcie3.c b/drivers/phy/rockchip/phy-rockchip-snps-pcie3.c
index 1917edda6b47..a8d5914c5ac5 100644
--- a/drivers/phy/rockchip/phy-rockchip-snps-pcie3.c
+++ b/drivers/phy/rockchip/phy-rockchip-snps-pcie3.c
@@ -231,15 +231,13 @@ static int rockchip_p3phy_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct rockchip_p3phy_priv *priv;
struct device_node *np = dev->of_node;
- struct resource *res;
int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->mmio = devm_ioremap_resource(dev, res);
+ priv->mmio = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(priv->mmio)) {
ret = PTR_ERR(priv->mmio);
return ret;