diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-05 17:01:25 +0800 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-07-12 22:27:40 +0530 |
commit | d746f127ea5b1d631d48977d1e599c312cbb05c2 (patch) | |
tree | d8f743c979e75ee1c0e00d837651f8793ded56f5 /drivers | |
parent | 1f8fe326015ff5a3d3b8c3666aa2bb607e7538d1 (diff) |
phy: renesas: r8a779f0-ether-serdes: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230705090126.26854-3-frank.li@vivo.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/phy/renesas/r8a779f0-ether-serdes.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/phy/renesas/r8a779f0-ether-serdes.c b/drivers/phy/renesas/r8a779f0-ether-serdes.c index 55b7bdfc10d3..67f4c6f8ff91 100644 --- a/drivers/phy/renesas/r8a779f0-ether-serdes.c +++ b/drivers/phy/renesas/r8a779f0-ether-serdes.c @@ -339,22 +339,15 @@ static int r8a779f0_eth_serdes_probe(struct platform_device *pdev) { struct r8a779f0_eth_serdes_drv_data *dd; struct phy_provider *provider; - struct resource *res; int i; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "invalid resource\n"); - return -EINVAL; - } - dd = devm_kzalloc(&pdev->dev, sizeof(*dd), GFP_KERNEL); if (!dd) return -ENOMEM; platform_set_drvdata(pdev, dd); dd->pdev = pdev; - dd->addr = devm_ioremap_resource(&pdev->dev, res); + dd->addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dd->addr)) return PTR_ERR(dd->addr); |