From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: Paul Cercueil <paul@crapouillou.net>,
Gwendal Grignou <gwendal@chromium.org>,
Andreas Klinger <ak@it-klinger.de>,
LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>,
Mike Looijmans <mike.looijmans@topic.nl>,
Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 1/6] iio: proximity: sx9310: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
Date: Sun, 18 Sep 2022 18:33:50 +0100 [thread overview]
Message-ID: <20220918183350.7cbc5cdf@jic23-huawei> (raw)
In-Reply-To: <20220807185618.1038812-2-jic23@kernel.org>
On Sun, 7 Aug 2022 19:56:13 +0100
Jonathan Cameron <jic23@kernel.org> wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> These new macros avoid the need for marking the callbacks __maybe_unused
> whilst ensuring both callbacks and structure may be dropped by the compiler
> if CONFIG_PM_SLEEP is not enabled.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Gwendal Grignou <gwendal@chromium.org>
Applied
> ---
> drivers/iio/proximity/sx9310.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/proximity/sx9310.c b/drivers/iio/proximity/sx9310.c
> index ea7318b508ea..0e4747ccd3cf 100644
> --- a/drivers/iio/proximity/sx9310.c
> +++ b/drivers/iio/proximity/sx9310.c
> @@ -965,7 +965,7 @@ static int sx9310_probe(struct i2c_client *client)
> return sx_common_probe(client, &sx9310_chip_info, &sx9310_regmap_config);
> }
>
> -static int __maybe_unused sx9310_suspend(struct device *dev)
> +static int sx9310_suspend(struct device *dev)
> {
> struct sx_common_data *data = iio_priv(dev_get_drvdata(dev));
> u8 ctrl0;
> @@ -991,7 +991,7 @@ static int __maybe_unused sx9310_suspend(struct device *dev)
> return ret;
> }
>
> -static int __maybe_unused sx9310_resume(struct device *dev)
> +static int sx9310_resume(struct device *dev)
> {
> struct sx_common_data *data = iio_priv(dev_get_drvdata(dev));
> int ret;
> @@ -1013,7 +1013,7 @@ static int __maybe_unused sx9310_resume(struct device *dev)
> return 0;
> }
>
> -static SIMPLE_DEV_PM_OPS(sx9310_pm_ops, sx9310_suspend, sx9310_resume);
> +static DEFINE_SIMPLE_DEV_PM_OPS(sx9310_pm_ops, sx9310_suspend, sx9310_resume);
>
> static const struct acpi_device_id sx9310_acpi_match[] = {
> { "STH9310", SX9310_WHOAMI_VALUE },
> @@ -1041,7 +1041,7 @@ static struct i2c_driver sx9310_driver = {
> .name = "sx9310",
> .acpi_match_table = sx9310_acpi_match,
> .of_match_table = sx9310_of_match,
> - .pm = &sx9310_pm_ops,
> + .pm = pm_sleep_ptr(&sx9310_pm_ops),
>
> /*
> * Lots of i2c transfers in probe + over 200 ms waiting in
next prev parent reply other threads:[~2022-09-18 17:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-07 18:56 [PATCH 0/6] iio: PM macro rework continued Jonathan Cameron
2022-08-07 18:56 ` [PATCH 1/6] iio: proximity: sx9310: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Jonathan Cameron
2022-09-18 17:33 ` Jonathan Cameron [this message]
2022-08-07 18:56 ` [PATCH 2/6] iio: proximity: sx9324: " Jonathan Cameron
2022-09-18 17:36 ` Jonathan Cameron
2022-08-07 18:56 ` [PATCH 3/6] iio: proximity: sx9360: " Jonathan Cameron
2022-09-18 17:36 ` Jonathan Cameron
2022-08-07 18:56 ` [PATCH 4/6] iio: proximity: srf04: Use pm_ptr() to remove unused struct dev_pm_ops Jonathan Cameron
2022-08-08 9:28 ` Andy Shevchenko
2022-08-08 9:34 ` Paul Cercueil
2022-08-08 9:39 ` Andy Shevchenko
2022-08-08 9:49 ` Paul Cercueil
2022-08-08 10:09 ` Andy Shevchenko
2022-08-08 10:17 ` Paul Cercueil
2022-08-08 10:26 ` Andy Shevchenko
2022-09-18 17:38 ` Jonathan Cameron
2022-08-07 18:56 ` [PATCH 5/6] iio: accel: bmi088: Use EXPORT_NS_GPL_RUNTIME_DEV_PM_OPS() and pm_ptr() Jonathan Cameron
2022-09-18 17:41 ` Jonathan Cameron
2022-08-07 18:56 ` [PATCH 6/6] iio: light: st_uvis25: Use EXPORT_NS_SIMPLE_DEV_PM_OPS() Jonathan Cameron
2022-09-18 17:42 ` Jonathan Cameron
2022-08-08 9:29 ` [PATCH 0/6] iio: PM macro rework continued 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=20220918183350.7cbc5cdf@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=Qing-wu.Li@leica-geosystems.com.cn \
--cc=ak@it-klinger.de \
--cc=gwendal@chromium.org \
--cc=linux-iio@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=mike.looijmans@topic.nl \
--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