bus: imx-weim: use devm_platform_ioremap_resource

Message ID 20230709133945.182307-1-martin@kaiser.cx
State New
Headers
Series bus: imx-weim: use devm_platform_ioremap_resource |

Commit Message

Martin Kaiser July 9, 2023, 1:39 p.m. UTC
  devm_platform_get_and_ioremap_resource maps a resource and returns its
physical address. If we don't need the physical address, we should call
devm_platform_ioremap_resource instead.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/bus/imx-weim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Shawn Guo July 19, 2023, 2:14 a.m. UTC | #1
On Sun, Jul 09, 2023 at 03:39:44PM +0200, Martin Kaiser wrote:
> devm_platform_get_and_ioremap_resource maps a resource and returns its
> physical address. If we don't need the physical address, we should call
> devm_platform_ioremap_resource instead.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>

Applied, thanks!
  

Patch

diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 52a5d0447390..42c9386a7b42 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -273,7 +273,7 @@  static int weim_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	/* get the resource */
-	base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);