[1/7] reset: brcmstb: Use devm_platform_get_and_ioremap_resource()

Message ID 20230704120211.38122-1-frank.li@vivo.com
State New
Headers
Series [1/7] reset: brcmstb: Use devm_platform_get_and_ioremap_resource() |

Commit Message

李扬韬 July 4, 2023, 12:02 p.m. UTC
  Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/reset/reset-brcmstb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Florian Fainelli July 4, 2023, 2:47 p.m. UTC | #1
On 7/4/2023 2:02 PM, Yangtao Li wrote:
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
  
Philipp Zabel Nov. 29, 2023, 11:49 a.m. UTC | #2
On Tue, 04 Jul 2023 20:02:05 +0800, Yangtao Li wrote:
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> 

Applied to reset/next, thanks!

[1/7] reset: brcmstb: Use devm_platform_get_and_ioremap_resource()
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=1750ec405933
[2/7] reset: meson-audio-arb: Convert to devm_platform_ioremap_resource()
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=66a1f3929a52
[3/7] reset: qcom-aoss: Convert to devm_platform_ioremap_resource()
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=3d471cfbf26c
[4/7] reset: qcom: Convert to devm_platform_ioremap_resource()
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=49994d704d39
[5/7] reset: simple: Convert to devm_platform_get_and_ioremap_resource()
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=ac53e621d802
[6/7] reset: sunplus: Use devm_platform_get_and_ioremap_resource()
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=5d587019fcca
[7/7] reset: uniphier-glue: Use devm_platform_get_and_ioremap_resource()
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=c64548122968

regards
Philipp
  

Patch

diff --git a/drivers/reset/reset-brcmstb.c b/drivers/reset/reset-brcmstb.c
index 42c9d5241c53..810fe76452d6 100644
--- a/drivers/reset/reset-brcmstb.c
+++ b/drivers/reset/reset-brcmstb.c
@@ -90,8 +90,7 @@  static int brcmstb_reset_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->base = devm_ioremap_resource(kdev, res);
+	priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(priv->base))
 		return PTR_ERR(priv->base);