All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sa, Nuno" <Nuno.Sa@analog.com>
To: Jonathan Cameron <jic23@kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: RE: [PATCH 5/5] iio: adc: cc10001: Switch remaining IIO calls in probe to devm_ forms.
Date: Mon, 31 Oct 2022 11:17:11 +0000	[thread overview]
Message-ID: <SJ0PR03MB6778101A495B0F3C6069E2CD99379@SJ0PR03MB6778.namprd03.prod.outlook.com> (raw)
In-Reply-To: <20221016170950.387751-6-jic23@kernel.org>



> -----Original Message-----
> From: Jonathan Cameron <jic23@kernel.org>
> Sent: Sunday, October 16, 2022 7:10 PM
> To: linux-iio@vger.kernel.org
> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Subject: [PATCH 5/5] iio: adc: cc10001: Switch remaining IIO calls in probe to
> devm_ forms.
> 
> [External]
> 
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> As everything else is now handled by devm managed releases the
> triggered buffer setup and IIO device registration can also be
> moved over to their devm forms allowing dropping of remove().
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  drivers/iio/adc/cc10001_adc.c | 28 +++-------------------------
>  1 file changed, 3 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/iio/adc/cc10001_adc.c b/drivers/iio/adc/cc10001_adc.c
> index b0daaec7ff16..ab71004ea8f1 100644
> --- a/drivers/iio/adc/cc10001_adc.c
> +++ b/drivers/iio/adc/cc10001_adc.c
> @@ -390,33 +390,12 @@ static int cc10001_adc_probe(struct
> platform_device *pdev)
> 
>  	mutex_init(&adc_dev->lock);
> 
> -	ret = iio_triggered_buffer_setup(indio_dev, NULL,
> -					 &cc10001_adc_trigger_h, NULL);
> +	ret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,
> +					      &cc10001_adc_trigger_h, NULL);
>  	if (ret < 0)
>  		return ret;
> 
> -	ret = iio_device_register(indio_dev);
> -	if (ret < 0)
> -		goto err_cleanup_buffer;
> -
> -	platform_set_drvdata(pdev, indio_dev);
> -

I wonder if it's obvious to everyone that removing this call as a consequence
of not needing  .remove() is clear enough that it does not deserve a mention
in the commit message?

Note that I don't find it particular important so I will still ack it and leave it
up to you :)


- Nuno Sá

  reply	other threads:[~2022-10-31 11:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 17:09 [PATCH 0/5] iio: adc: cc10001: Devm conversion Jonathan Cameron
2022-10-16 17:09 ` [PATCH 1/5] iio: adc: cc10001: Add local struct device *dev variable to avoid repitition Jonathan Cameron
2022-10-16 17:09 ` [PATCH 2/5] iio: adc: cc10001: Add devm_add_action_or_reset() to disable regulator Jonathan Cameron
2022-10-16 17:09 ` [PATCH 3/5] iio: adc: cc10001: Use devm_clk_get_enabled() to avoid boilerplate Jonathan Cameron
2022-10-31 11:19   ` Sa, Nuno
2022-10-16 17:09 ` [PATCH 4/5] iio: adc: cc10001: Use devm_ to call device power down Jonathan Cameron
2022-10-16 17:09 ` [PATCH 5/5] iio: adc: cc10001: Switch remaining IIO calls in probe to devm_ forms Jonathan Cameron
2022-10-31 11:17   ` Sa, Nuno [this message]
2022-10-29 12:43 ` [PATCH 0/5] iio: adc: cc10001: Devm conversion Jonathan Cameron
2022-10-31 11:19   ` Sa, Nuno
2022-11-06 11:48     ` Jonathan Cameron

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=SJ0PR03MB6778101A495B0F3C6069E2CD99379@SJ0PR03MB6778.namprd03.prod.outlook.com \
    --to=nuno.sa@analog.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.