Re: [PATCH 12/18] drm/tegra: dpaux: Convert to devm_platform_ioremap_resource()

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

 



On Fri, Jul 07, 2023 at 03:20:28PM +0800, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@xxxxxxxx>
> ---
>  drivers/gpu/drm/tegra/dpaux.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
> index 4d2677dcd831..f120897ce4b3 100644
> --- a/drivers/gpu/drm/tegra/dpaux.c
> +++ b/drivers/gpu/drm/tegra/dpaux.c
> @@ -447,7 +447,6 @@ static const struct pinmux_ops tegra_dpaux_pinmux_ops = {
>  static int tegra_dpaux_probe(struct platform_device *pdev)
>  {
>  	struct tegra_dpaux *dpaux;
> -	struct resource *regs;
>  	u32 value;
>  	int err;
>  
> @@ -461,14 +460,13 @@ static int tegra_dpaux_probe(struct platform_device *pdev)
>  	INIT_LIST_HEAD(&dpaux->list);
>  	dpaux->dev = &pdev->dev;
>  
> -	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	dpaux->regs = devm_ioremap_resource(&pdev->dev, regs);
> +	dpaux->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(dpaux->regs))
>  		return PTR_ERR(dpaux->regs);
>  
>  	dpaux->irq = platform_get_irq(pdev, 0);
>  	if (dpaux->irq < 0)
> -		return -ENXIO;
> +		return dpaux->irq;

This change has nothing to do with what the commit message says. It
looks correct, but it should be a separate patch.

Thierry

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux