[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9bd1b2a1-1d86-3907-e62b-f1ecc2dc9995@wanadoo.fr>
Date: Fri, 27 Aug 2021 18:34:32 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Dan Carpenter <dan.carpenter@...cle.com>
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()'
Le 27/08/2021 à 09:35, Dan Carpenter a écrit :
> 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
>
>
Hi Dan,
This v2 should not be taken into account.
I've sent a v3 just after which already implements what you propose.
Other comments on this v3 are welcome.
CJ
Powered by blists - more mailing lists