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