* [PATCH -next] phy: dphy: Use devm_platform_ioremap_resource()
@ 2023-03-23 7:35 Yang Li
2023-03-23 9:12 ` neil.armstrong
2023-03-31 13:49 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Yang Li @ 2023-03-23 7:35 UTC (permalink / raw)
To: neil.armstrong
Cc: khilman, vkoul, kishon, jbrunet, martin.blumenstingl, linux-phy,
linux-arm-kernel, linux-amlogic, linux-kernel, Yang Li
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.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c b/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
index 32d1ff09befb..6e9af79e152c 100644
--- a/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
+++ b/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
@@ -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);
--
2.20.1.7.g153144c
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] phy: dphy: Use devm_platform_ioremap_resource()
2023-03-23 7:35 [PATCH -next] phy: dphy: Use devm_platform_ioremap_resource() Yang Li
@ 2023-03-23 9:12 ` neil.armstrong
2023-03-31 13:49 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: neil.armstrong @ 2023-03-23 9:12 UTC (permalink / raw)
To: Yang Li
Cc: khilman, vkoul, kishon, jbrunet, martin.blumenstingl, linux-phy,
linux-arm-kernel, linux-amlogic, linux-kernel
On 23/03/2023 08:35, Yang Li wrote:
> 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.
>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c b/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
> index 32d1ff09befb..6e9af79e152c 100644
> --- a/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
> +++ b/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
> @@ -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);
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] phy: dphy: Use devm_platform_ioremap_resource()
2023-03-23 7:35 [PATCH -next] phy: dphy: Use devm_platform_ioremap_resource() Yang Li
2023-03-23 9:12 ` neil.armstrong
@ 2023-03-31 13:49 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2023-03-31 13:49 UTC (permalink / raw)
To: Yang Li
Cc: neil.armstrong, khilman, kishon, jbrunet, martin.blumenstingl,
linux-phy, linux-arm-kernel, linux-amlogic, linux-kernel
On 23-03-23, 15:35, Yang Li wrote:
> 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.
Applied, thanks
--
~Vinod
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-31 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 7:35 [PATCH -next] phy: dphy: Use devm_platform_ioremap_resource() Yang Li
2023-03-23 9:12 ` neil.armstrong
2023-03-31 13:49 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).