[6/7] bus: vexpress-config: Convert to devm_platform_ioremap_resource()

Message ID 20230706072042.31296-6-frank.li@vivo.com
State New
Headers
Series [1/7] bus: sunxi-rsb: Convert to devm_platform_ioremap_resource() |

Commit Message

李扬韬 July 6, 2023, 7:20 a.m. UTC
  Use devm_platform_ioremap_resource() to simplify code.

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

Comments

Sudeep Holla July 19, 2023, 10:06 a.m. UTC | #1
On Thu, 06 Jul 2023 15:20:36 +0800, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>

Applied to sudeep.holla/linux (for-next/vexpress/updates), thanks!

[6/7] bus: vexpress-config: Convert to devm_platform_ioremap_resource()
      https://git.kernel.org/sudeep.holla/c/bc0e769647d7
--
Regards,
Sudeep
  

Patch

diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c
index 472a570bd53a..c4e1becbb2d2 100644
--- a/drivers/bus/vexpress-config.c
+++ b/drivers/bus/vexpress-config.c
@@ -350,7 +350,6 @@  static struct vexpress_config_bridge_ops vexpress_syscfg_bridge_ops = {
 static int vexpress_syscfg_probe(struct platform_device *pdev)
 {
 	struct vexpress_syscfg *syscfg;
-	struct resource *res;
 	struct vexpress_config_bridge *bridge;
 	struct device_node *node;
 	int master;
@@ -362,8 +361,7 @@  static int vexpress_syscfg_probe(struct platform_device *pdev)
 	syscfg->dev = &pdev->dev;
 	INIT_LIST_HEAD(&syscfg->funcs);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	syscfg->base = devm_ioremap_resource(&pdev->dev, res);
+	syscfg->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(syscfg->base))
 		return PTR_ERR(syscfg->base);