lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 07 Aug 2014 14:47:02 +0100
From:	Jonathan Cameron <jic23@...nel.org>
To:	Himangi Saraogi <himangi774@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-iio@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
CC:	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] staging:iio:ad9852: Use devm_iio_device_register

On 03/08/14 10:58, Himangi Saraogi wrote:
> This patch introduces the use of devm_iio_device_register and does away
> with the unregister in the remove function.
> 
> Signed-off-by: Himangi Saraogi <himangi774@...il.com>
> Acked-by: Julia Lawall <julia.lawall@...6.fr>
Applied to the togreg branch of iio.git

Thanks,

J
> ---
>  drivers/staging/iio/frequency/ad9852.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/iio/frequency/ad9852.c b/drivers/staging/iio/frequency/ad9852.c
> index 11e4367..af2f2cc 100644
> --- a/drivers/staging/iio/frequency/ad9852.c
> +++ b/drivers/staging/iio/frequency/ad9852.c
> @@ -218,7 +218,7 @@ static int ad9852_probe(struct spi_device *spi)
>  	idev->info = &ad9852_info;
>  	idev->modes = INDIO_DIRECT_MODE;
>  
> -	ret = iio_device_register(idev);
> +	ret = devm_iio_device_register(&spi->dev, idev);
>  	if (ret)
>  		return ret;
>  	spi->max_speed_hz = 2000000;
> @@ -230,20 +230,12 @@ static int ad9852_probe(struct spi_device *spi)
>  	return 0;
>  }
>  
> -static int ad9852_remove(struct spi_device *spi)
> -{
> -	iio_device_unregister(spi_get_drvdata(spi));
> -
> -	return 0;
> -}
> -
>  static struct spi_driver ad9852_driver = {
>  	.driver = {
>  		.name = DRV_NAME,
>  		.owner = THIS_MODULE,
>  	},
>  	.probe = ad9852_probe,
> -	.remove = ad9852_remove,
>  };
>  module_spi_driver(ad9852_driver);
>  
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists