Re: [PATCH 09/11] media: platform: ti: Use devm_platform_get_and_ioremap_resource()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Yangtao,

Thank you for the patch.

On Thu, Jul 06, 2023 at 06:10:57PM +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.
> 
> Signed-off-by: Yangtao Li <frank.li@xxxxxxxx>
> ---
>  drivers/media/platform/ti/omap3isp/isp.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/ti/omap3isp/isp.c b/drivers/media/platform/ti/omap3isp/isp.c
> index f3aaa9e76492..1c8e4ede29b6 100644
> --- a/drivers/media/platform/ti/omap3isp/isp.c
> +++ b/drivers/media/platform/ti/omap3isp/isp.c
> @@ -2329,9 +2329,7 @@ static int isp_probe(struct platform_device *pdev)
>  	for (i = 0; i < 2; i++) {
>  		unsigned int map_idx = i ? OMAP3_ISP_IOMEM_CSI2A_REGS1 : 0;
>  
> -		mem = platform_get_resource(pdev, IORESOURCE_MEM, i);
> -		isp->mmio_base[map_idx] =
> -			devm_ioremap_resource(isp->dev, mem);
> +		isp->mmio_base[map_idx] = devm_platform_get_and_ioremap_resource(pdev, i, &mem);

I expect Sakari to prefer a line wrap:

		isp->mmio_base[map_idx] =
			devm_platform_get_and_ioremap_resource(pdev, i, &mem);

I assume he will be able to change this when picking up the patch,
without requiring a v2.

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

>  		if (IS_ERR(isp->mmio_base[map_idx])) {
>  			ret = PTR_ERR(isp->mmio_base[map_idx]);
>  			goto error;

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux