Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Paul Cercueil <paul@crapouillou.net>, Crt Mori <cmo@melexis.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 1/2] iio: pressure: icp10100: Switch from UNIVERSAL to DEFINE_RUNTIME_DEV_PM_OPS().
Date: Sun, 4 Sep 2022 17:43:45 +0100	[thread overview]
Message-ID: <20220904174345.06903089@jic23-huawei> (raw)
In-Reply-To: <FR3P281MB175798EA1774B9FCE677B7FECE6B9@FR3P281MB1757.DEUP281.PROD.OUTLOOK.COM>

On Tue, 16 Aug 2022 13:13:52 +0000
Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com> wrote:

> Hello,
> 
> looks good, thanks for the patch.
> 
> Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>

Applied
> 
> Thanks,
> JB
> 
> 
> From: Jonathan Cameron <jic23@kernel.org>
> Sent: Sunday, August 7, 2022 21:04
> To: linux-iio@vger.kernel.org <linux-iio@vger.kernel.org>
> Cc: Paul Cercueil <paul@crapouillou.net>; Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@tdk.com>; Crt Mori <cmo@melexis.com>; Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Subject: [PATCH 1/2] iio: pressure: icp10100: Switch from UNIVERSAL to DEFINE_RUNTIME_DEV_PM_OPS(). 
> _
> [CAUTION] This is EXTERNAL email. Do not click any links or open attachments unless you recognize the sender and know the content is safe.
> 
> ======================================================================
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> The suspend and resume callbacks in this driver appear to be safe
> to call repeatedly, but why do so when we can use the
> DEFINE_RUNTIME_DEV_PM_OPS() macro to supply callbacks that check if
> we are already runtime suspended before doing unnecessary work.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
> ---
> _drivers/iio/pressure/icp10100.c | 10 +++++-----
> _1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/pressure/icp10100.c b/drivers/iio/pressure/icp10100.c
> index af4621eaa6b5..b62f28585db5 100644
> --- a/drivers/iio/pressure/icp10100.c
> +++ b/drivers/iio/pressure/icp10100.c
> @@ -595,7 +595,7 @@ static int icp10100_probe(struct i2c_client *client,
> ________ return devm_iio_device_register(&client->dev, indio_dev);
> _}
> _
> -static int __maybe_unused icp10100_suspend(struct device *dev)
> +static int icp10100_suspend(struct device *dev)
> _{
> ________ struct icp10100_state *st = iio_priv(dev_get_drvdata(dev));
> ________ int ret;
> @@ -607,7 +607,7 @@ static int __maybe_unused icp10100_suspend(struct device *dev)
> ________ return ret;
> _}
> _
> -static int __maybe_unused icp10100_resume(struct device *dev)
> +static int icp10100_resume(struct device *dev)
> _{
> ________ struct icp10100_state *st = iio_priv(dev_get_drvdata(dev));
> ________ int ret;
> @@ -626,8 +626,8 @@ static int __maybe_unused icp10100_resume(struct device *dev)
> ________ return ret;
> _}
> _
> -static UNIVERSAL_DEV_PM_OPS(icp10100_pm, icp10100_suspend, icp10100_resume,
> -__________________________ NULL);
> +static DEFINE_RUNTIME_DEV_PM_OPS(icp10100_pm, icp10100_suspend, icp10100_resume,
> +_______________________________ NULL);
> _
> _static const struct of_device_id icp10100_of_match[] = {
> ________ {
> @@ -646,7 +646,7 @@ MODULE_DEVICE_TABLE(i2c, icp10100_id);
> _static struct i2c_driver icp10100_driver = {
> ________ .driver = {
> ________________ .name = "icp10100",
> -______________ .pm = &icp10100_pm,
> +______________ .pm = pm_ptr(&icp10100_pm),
> ________________ .of_match_table = icp10100_of_match,
> ________ },
> ________ .probe = icp10100_probe,


  reply	other threads:[~2022-09-04 17:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-07 19:04 [PATCH 0/2] iio: Convert some drivers from deprecated UNIVERSAL_DEV_PM_OPS() Jonathan Cameron
2022-08-07 19:04 ` [PATCH 1/2] iio: pressure: icp10100: Switch from UNIVERSAL to DEFINE_RUNTIME_DEV_PM_OPS() Jonathan Cameron
2022-08-16 13:13   ` Jean-Baptiste Maneyrol
2022-09-04 16:43     ` Jonathan Cameron [this message]
2022-08-07 19:04 ` [PATCH 2/2] iio: temp: mlx90632: Switch form UNVIVERSAL " Jonathan Cameron
2022-08-08 11:26   ` Crt Mori
2022-08-11 14:18     ` Jonathan Cameron
2022-09-04 16:42       ` Jonathan Cameron
2022-08-08  9:30 ` [PATCH 0/2] iio: Convert some drivers from deprecated UNIVERSAL_DEV_PM_OPS() Andy Shevchenko

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=20220904174345.06903089@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jean-Baptiste.Maneyrol@tdk.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=cmo@melexis.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=paul@crapouillou.net \
    /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