Re: [PATCH -next] spi: wpcm-fiu: switch to use devm_platform_ioremap_resource_byname()

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

 



Hello,

thanks for your patch!

On Thu, Aug 03, 2023 at 10:14:28AM +0800, Yang Yingliang wrote:
> Use the devm_platform_ioremap_resource_byname() helper instead of
> calling platform_get_resource_byname() and devm_ioremap_resource()
> separately.
> 
> Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
> ---
>  drivers/spi/spi-wpcm-fiu.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-wpcm-fiu.c b/drivers/spi/spi-wpcm-fiu.c
> index 852ffe013d32..d07a06f49204 100644
> --- a/drivers/spi/spi-wpcm-fiu.c
> +++ b/drivers/spi/spi-wpcm-fiu.c
> @@ -448,8 +448,7 @@ static int wpcm_fiu_probe(struct platform_device *pdev)
>  	fiu = spi_controller_get_devdata(ctrl);
>  	fiu->dev = dev;
>  
> -	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "control");
> -	fiu->regs = devm_ioremap_resource(dev, res);
> +	fiu->regs = devm_platform_ioremap_resource_byname(pdev, "control");

Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@xxxxxxx>


Unfortunately, the other platform_get_resource_byname/devm_ioremap_resource
pair a few lines below can't easily be converted to
devm_platform_ioremap_resource_byname, because resource_size is needed.


Best regards,
Jonathan

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux