[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210827073536.GD1931@kadam>
Date: Fri, 27 Aug 2021 10:35:36 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: jic23@...nel.org, lars@...afoo.de, ardeleanalex@...il.com,
andy.shevchenko@...il.com, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v2] iio: adc128s052: Simplify 'adc128_probe()'
On Thu, Aug 26, 2021 at 08:28:08PM +0200, Christophe JAILLET wrote:
> @@ -172,13 +167,23 @@ static int adc128_probe(struct spi_device *spi)
> ret = regulator_enable(adc->reg);
> if (ret < 0)
> return ret;
> - ret = devm_add_action_or_reset(&spi->dev, adc128_disable_regulator, adc->reg);
> - if (ret)
> - return ret;
>
> mutex_init(&adc->lock);
>
> - return devm_iio_device_register(&spi->dev, indio_dev);
> + ret = iio_device_register(indio_dev);
> +
> + return ret;
Since you're resending anyway then please do:
return iio_device_register(indio_dev);
regards,
dan carpenter
Powered by blists - more mailing lists