* [PATCH] media: platform: renesas: use devm_platform_get_and_ioremap_resource()
@ 2023-02-08 8:59 ye.xingchen
2023-02-08 9:06 ` Geert Uytterhoeven
2023-02-08 10:03 ` Niklas Söderlund
0 siblings, 2 replies; 3+ messages in thread
From: ye.xingchen @ 2023-02-08 8:59 UTC (permalink / raw)
To: niklas.soderlund; +Cc: mchehab, linux-media, linux-renesas-soc, linux-kernel
From: Ye Xingchen <ye.xingchen@zte.com.cn>
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: Ye Xingchen <ye.xingchen@zte.com.cn>
---
drivers/media/platform/renesas/rcar-isp.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/media/platform/renesas/rcar-isp.c b/drivers/media/platform/renesas/rcar-isp.c
index 10b3474f93a4..a3cfd21f8aae 100644
--- a/drivers/media/platform/renesas/rcar-isp.c
+++ b/drivers/media/platform/renesas/rcar-isp.c
@@ -419,10 +419,7 @@ static const struct media_entity_operations risp_entity_ops = {
static int risp_probe_resources(struct rcar_isp *isp,
struct platform_device *pdev)
{
- struct resource *res;
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- isp->base = devm_ioremap_resource(&pdev->dev, res);
+ isp->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(isp->base))
return PTR_ERR(isp->base);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: platform: renesas: use devm_platform_get_and_ioremap_resource()
2023-02-08 8:59 [PATCH] media: platform: renesas: use devm_platform_get_and_ioremap_resource() ye.xingchen
@ 2023-02-08 9:06 ` Geert Uytterhoeven
2023-02-08 10:03 ` Niklas Söderlund
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-02-08 9:06 UTC (permalink / raw)
To: ye.xingchen
Cc: niklas.soderlund, mchehab, linux-media, linux-renesas-soc, linux-kernel
On Wed, Feb 8, 2023 at 10:02 AM <ye.xingchen@zte.com.cn> wrote:
> From: Ye Xingchen <ye.xingchen@zte.com.cn>
>
> 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: Ye Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: platform: renesas: use devm_platform_get_and_ioremap_resource()
2023-02-08 8:59 [PATCH] media: platform: renesas: use devm_platform_get_and_ioremap_resource() ye.xingchen
2023-02-08 9:06 ` Geert Uytterhoeven
@ 2023-02-08 10:03 ` Niklas Söderlund
1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2023-02-08 10:03 UTC (permalink / raw)
To: ye.xingchen; +Cc: mchehab, linux-media, linux-renesas-soc, linux-kernel
Hi Ye,
Thanks for your work.
On 2023-02-08 16:59:40 +0800, ye.xingchen@zte.com.cn wrote:
> From: Ye Xingchen <ye.xingchen@zte.com.cn>
>
> 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: Ye Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> drivers/media/platform/renesas/rcar-isp.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/renesas/rcar-isp.c b/drivers/media/platform/renesas/rcar-isp.c
> index 10b3474f93a4..a3cfd21f8aae 100644
> --- a/drivers/media/platform/renesas/rcar-isp.c
> +++ b/drivers/media/platform/renesas/rcar-isp.c
> @@ -419,10 +419,7 @@ static const struct media_entity_operations risp_entity_ops = {
> static int risp_probe_resources(struct rcar_isp *isp,
> struct platform_device *pdev)
> {
> - struct resource *res;
> -
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - isp->base = devm_ioremap_resource(&pdev->dev, res);
> + isp->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
> if (IS_ERR(isp->base))
> return PTR_ERR(isp->base);
>
> --
> 2.25.1
--
Kind Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-08 10:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08 8:59 [PATCH] media: platform: renesas: use devm_platform_get_and_ioremap_resource() ye.xingchen
2023-02-08 9:06 ` Geert Uytterhoeven
2023-02-08 10:03 ` Niklas Söderlund
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).