Re: [PATCH v2] iio: adc128s052: Simplify 'adc128_probe()'

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

 



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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux