From: Markus Elfring <Markus.Elfring@web.de>
To: linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org,
Jai Luthra <j-luthra@ti.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] media: ti: Use devm_platform_get_and_ioremap_resource() in ti_csi2rx_probe()
Date: Mon, 5 Feb 2024 13:20:30 +0100 [thread overview]
Message-ID: <66d7218d-ed57-4dec-b6ac-630b01056b5e@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 5 Feb 2024 13:14:00 +0100
A wrapper function is available since the commit 890cc39a879906b63912482dfc41944579df2dc6
("drivers: provide devm_platform_get_and_ioremap_resource()").
Thus reuse existing functionality instead of keeping duplicate source code.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
index 2b078c5d7f5d..6ff066097346 100644
--- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
+++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
@@ -1100,9 +1100,7 @@ static int ti_csi2rx_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, csi);
mutex_init(&csi->mutex);
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- csi->shim = devm_ioremap_resource(&pdev->dev, res);
+ csi->shim = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(csi->shim)) {
ret = PTR_ERR(csi->shim);
goto err_mutex;
--
2.43.0
next reply other threads:[~2024-02-05 12:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 12:20 Markus Elfring [this message]
2024-02-06 9:53 ` [PATCH] media: ti: Use devm_platform_get_and_ioremap_resource() in ti_csi2rx_probe() Jai Luthra
2024-02-06 14:37 ` [PATCH v2] media: ti: Use devm_platform_ioremap_resource() " Markus Elfring
2024-02-07 15:18 ` Jai Luthra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=66d7218d-ed57-4dec-b6ac-630b01056b5e@web.de \
--to=markus.elfring@web.de \
--cc=j-luthra@ti.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox