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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7c56658547a972b4e4a2b075b2319192f89c803.camel@analog.com>
Date:   Fri, 26 Jul 2019 12:36:08 +0000
From:   "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>
To:     "hslester96@...il.com" <hslester96@...il.com>
CC:     "Popa, Stefan Serban" <StefanSerban.Popa@...log.com>,
        "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "jic23@...nel.org" <jic23@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Hennerich, Michael" <Michael.Hennerich@...log.com>,
        "lars@...afoo.de" <lars@...afoo.de>
Subject: Re: [PATCH] staging: iio: ad2s1210: Use device-managed API

On Fri, 2019-07-26 at 19:07 +0800, Chuhong Yuan wrote:
> [External]
> 
> Use device-managed API to simplify the code.
> The remove function is redundant now and can
> be deleted.

Reviewed-by: Alexandru Ardelean <alexandru.ardelean@...log.com>

> 
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
>  drivers/staging/iio/resolver/ad2s1210.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
> index 0c1bd108c386..4b25a3a314ed 100644
> --- a/drivers/staging/iio/resolver/ad2s1210.c
> +++ b/drivers/staging/iio/resolver/ad2s1210.c
> @@ -671,7 +671,7 @@ static int ad2s1210_probe(struct spi_device *spi)
>  	indio_dev->num_channels = ARRAY_SIZE(ad2s1210_channels);
>  	indio_dev->name = spi_get_device_id(spi)->name;
>  
> -	ret = iio_device_register(indio_dev);
> +	ret = devm_iio_device_register(&spi->dev, indio_dev);
>  	if (ret)
>  		return ret;
>  
> @@ -683,15 +683,6 @@ static int ad2s1210_probe(struct spi_device *spi)
>  	return 0;
>  }
>  
> -static int ad2s1210_remove(struct spi_device *spi)
> -{
> -	struct iio_dev *indio_dev = spi_get_drvdata(spi);
> -
> -	iio_device_unregister(indio_dev);
> -
> -	return 0;
> -}
> -
>  static const struct of_device_id ad2s1210_of_match[] = {
>  	{ .compatible = "adi,ad2s1210", },
>  	{ }
> @@ -710,7 +701,6 @@ static struct spi_driver ad2s1210_driver = {
>  		.of_match_table = of_match_ptr(ad2s1210_of_match),
>  	},
>  	.probe = ad2s1210_probe,
> -	.remove = ad2s1210_remove,
>  	.id_table = ad2s1210_id,
>  };
>  module_spi_driver(ad2s1210_driver);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ