From: Jonathan Cameron <jic23@kernel.org>
To: Himangi Saraogi <himangi774@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH] staging: iio: ad9951: Use devm_iio_device_register
Date: Thu, 07 Aug 2014 14:46:09 +0100 [thread overview]
Message-ID: <53E38321.1000804@kernel.org> (raw)
In-Reply-To: <20140803100048.GA6936@himangi-Dell>
On 03/08/14 11:00, Himangi Saraogi wrote:
> This patch introduces the use of devm_iio_device_register and does away
> with the unregister in the remove function. The remove function is no
> longer required and is completely removed.
>
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Applied to the togreg branch of iio.git
Thanks,
J
> ---
> drivers/staging/iio/frequency/ad9951.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/staging/iio/frequency/ad9951.c b/drivers/staging/iio/frequency/ad9951.c
> index 5e8990a..d465db0 100644
> --- a/drivers/staging/iio/frequency/ad9951.c
> +++ b/drivers/staging/iio/frequency/ad9951.c
> @@ -175,7 +175,7 @@ static int ad9951_probe(struct spi_device *spi)
> idev->info = &ad9951_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;
> @@ -186,20 +186,12 @@ static int ad9951_probe(struct spi_device *spi)
> return 0;
> }
>
> -static int ad9951_remove(struct spi_device *spi)
> -{
> - iio_device_unregister(spi_get_drvdata(spi));
> -
> - return 0;
> -}
> -
> static struct spi_driver ad9951_driver = {
> .driver = {
> .name = DRV_NAME,
> .owner = THIS_MODULE,
> },
> .probe = ad9951_probe,
> - .remove = ad9951_remove,
> };
> module_spi_driver(ad9951_driver);
>
>
prev parent reply other threads:[~2014-08-07 13:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-03 10:00 [PATCH] staging: iio: ad9951: Use devm_iio_device_register Himangi Saraogi
2014-08-07 13:46 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53E38321.1000804@kernel.org \
--to=jic23@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=himangi774@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).