phy: dphy: Use devm_platform_ioremap_resource()
Subsystems (2)
PATCH 1/1 phy: dphy: Use devm_platform_ioremap_resource()
According to commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to use devm_platform_ioremap_resource(), as this is exactly what this function does.
--- drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c +1 -3
@@ -335,7 +335,6 @@ static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct phy_provider *phy_provider; -struct resource *res;struct phy_meson_axg_mipi_dphy_priv *priv;struct phy *phy;void __iomem *base;
@@ -348,8 +347,7 @@ static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev) priv->dev = dev;platform_set_drvdata (pdev, priv); - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - base =devm_ioremap_resource (dev, res); + base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (base))return PTR_ERR (base);
Signature · 1 line
2.20.1.7.g153144c
Quoted 24 lines · Yang Li
According to commit
7945f929f1a7("drivers: providedevm_platform_ioremap_resource()"), convertplatform_get_resource(),devm_ioremap_resource()to a single call to usedevm_platform_ioremap_resource(), as this is exactly what this function does.Signed-off-by Yang Li <[email protected]>--- drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c +0
-1@@ -335,7 +335,6 @@ static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct phy_provider *phy_provider; -struct resource *res;struct phy_meson_axg_mipi_dphy_priv *priv;struct phy *phy;void __iomem *base;
drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev) · line 353
Quoted 9 lines
drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c +1
-2@@ -348,8 +347,7 @@ static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev) priv->dev = dev;platform_set_drvdata (pdev, priv); - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - base =devm_ioremap_resource (dev, res); + base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (base))return PTR_ERR (base);
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Quoted 5 lines · Yang Li
According to commit
7945f929f1a7("drivers: providedevm_platform_ioremap_resource()"), convertplatform_get_resource(),devm_ioremap_resource()to a single call to usedevm_platform_ioremap_resource(), as this is exactly what this function does.
Applied, thanks
Signature · 1 line
~Vinod