lkml.org 
[lkml]   [2020]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATH v3 3/3] iio: adc: xilinx: use more devres helpers and remove remove()
On Mon, 30 Nov 2020 15:30:22 +0100
Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> On Mon, Nov 30, 2020 at 3:28 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> >
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > In order to simplify resource management and error paths in probe() and
> > entirely drop the remove() callback - use devres helpers wherever
> > possible. Define devm actions for cancelling the delayed work and
> > disabling the clock.
> >
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > ---
>
> [snip]
>
> >
> > /* Set thresholds to min/max */
> > for (i = 0; i < 16; i++) {
> > @@ -1334,59 +1353,23 @@ static int xadc_probe(struct platform_device *pdev)
> > ret = xadc_write_adc_reg(xadc, XADC_REG_THRESHOLD(i),
> > xadc->threshold[i]);
> > if (ret)
> > - goto err_free_irq;
> > + return ret;
> > }
> >
> > /* Go to non-buffered mode */
> > xadc_postdisable(indio_dev);
> >
> > - ret = iio_device_register(indio_dev);
> > + ret = devm_iio_device_register(dev, indio_dev);
> > if (ret)
> > - goto err_free_irq;
> > + return ret;
> >
> > platform_set_drvdata(pdev, indio_dev);
> >
>
> Cr*p I was supposed to drop this line...
>
> Jonathan: can you drop it when applying?
Sure.

J

>
> Bartosz
>
> [snip]
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

\
 
 \ /
  Last update: 2020-11-30 17:19    [W:0.040 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site