Re: [PATCH 11/33] iio: gyro: adis16130: Use devm_iio_device_register

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

 



On 10/29/13 11:39, Sachin Kamat wrote:
> devm_iio_device_register simplifies the code.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
Suprisingly, this device doesn't seem to have any low power mode
or similar, hence applied to the togreg branch of iio.git

Thanks,

> ---
>  drivers/iio/gyro/adis16130.c |    9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/iio/gyro/adis16130.c b/drivers/iio/gyro/adis16130.c
> index 445c2ae..8d08c7e 100644
> --- a/drivers/iio/gyro/adis16130.c
> +++ b/drivers/iio/gyro/adis16130.c
> @@ -161,13 +161,7 @@ static int adis16130_probe(struct spi_device *spi)
>  	indio_dev->info = &adis16130_info;
>  	indio_dev->modes = INDIO_DIRECT_MODE;
>  
> -	return iio_device_register(indio_dev);
> -}
> -
> -static int adis16130_remove(struct spi_device *spi)
> -{
> -	iio_device_unregister(spi_get_drvdata(spi));
> -	return 0;
> +	return devm_iio_device_register(&spi->dev, indio_dev);
>  }
>  
>  static struct spi_driver adis16130_driver = {
> @@ -176,7 +170,6 @@ static struct spi_driver adis16130_driver = {
>  		.owner = THIS_MODULE,
>  	},
>  	.probe = adis16130_probe,
> -	.remove = adis16130_remove,
>  };
>  module_spi_driver(adis16130_driver);
>  
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux