linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Caleb Connolly <caleb@connolly.tech>
To: Jonathan Cameron <jic23@kernel.org>,
	linux-input@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Andi Shyti <andi@etezian.org>
Subject: Re: [PATCH 04/16] Input: s6sy761 - switch to SYSTEM_SLEEP_/RUNTIME_PM_OPS() and pm_ptr()
Date: Mon, 16 Jan 2023 14:20:57 +0000	[thread overview]
Message-ID: <3c6c160f-4f35-859d-9f06-92477174cbb4@connolly.tech> (raw)
In-Reply-To: <20230114171620.42891-5-jic23@kernel.org>



On 14/01/2023 17:16, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated as
> they require explicit protection against unused function warnings.
> The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/
> RUNTIME_PM_OPS() allows the compiler to see the functions,
> thus suppressing the warning, but still allowing the unused code to be
> removed. Thus also drop the __maybe_unused markings.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Tested-by: Caleb Connolly <caleb@connolly.tech> # oneplus-guacamole
> Cc: Caleb Connolly <caleb@connolly.tech>
> Cc: Andi Shyti <andi@etezian.org>
> ---
>  drivers/input/touchscreen/s6sy761.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/input/touchscreen/s6sy761.c b/drivers/input/touchscreen/s6sy761.c
> index cc417c03aaca..371cf4848ad5 100644
> --- a/drivers/input/touchscreen/s6sy761.c
> +++ b/drivers/input/touchscreen/s6sy761.c
> @@ -479,7 +479,7 @@ static void s6sy761_remove(struct i2c_client *client)
>  	pm_runtime_disable(&client->dev);
>  }
>
> -static int __maybe_unused s6sy761_runtime_suspend(struct device *dev)
> +static int s6sy761_runtime_suspend(struct device *dev)
>  {
>  	struct s6sy761_data *sdata = dev_get_drvdata(dev);
>
> @@ -487,7 +487,7 @@ static int __maybe_unused s6sy761_runtime_suspend(struct device *dev)
>  				S6SY761_APPLICATION_MODE, S6SY761_APP_SLEEP);
>  }
>
> -static int __maybe_unused s6sy761_runtime_resume(struct device *dev)
> +static int s6sy761_runtime_resume(struct device *dev)
>  {
>  	struct s6sy761_data *sdata = dev_get_drvdata(dev);
>
> @@ -495,7 +495,7 @@ static int __maybe_unused s6sy761_runtime_resume(struct device *dev)
>  				S6SY761_APPLICATION_MODE, S6SY761_APP_NORMAL);
>  }
>
> -static int __maybe_unused s6sy761_suspend(struct device *dev)
> +static int s6sy761_suspend(struct device *dev)
>  {
>  	struct s6sy761_data *sdata = dev_get_drvdata(dev);
>
> @@ -504,7 +504,7 @@ static int __maybe_unused s6sy761_suspend(struct device *dev)
>  	return 0;
>  }
>
> -static int __maybe_unused s6sy761_resume(struct device *dev)
> +static int s6sy761_resume(struct device *dev)
>  {
>  	struct s6sy761_data *sdata = dev_get_drvdata(dev);
>
> @@ -514,9 +514,8 @@ static int __maybe_unused s6sy761_resume(struct device *dev)
>  }
>
>  static const struct dev_pm_ops s6sy761_pm_ops = {
> -	SET_SYSTEM_SLEEP_PM_OPS(s6sy761_suspend, s6sy761_resume)
> -	SET_RUNTIME_PM_OPS(s6sy761_runtime_suspend,
> -				s6sy761_runtime_resume, NULL)
> +	SYSTEM_SLEEP_PM_OPS(s6sy761_suspend, s6sy761_resume)
> +	RUNTIME_PM_OPS(s6sy761_runtime_suspend, s6sy761_runtime_resume, NULL)
>  };
>
>  #ifdef CONFIG_OF
> @@ -537,7 +536,7 @@ static struct i2c_driver s6sy761_driver = {
>  	.driver = {
>  		.name = S6SY761_DEV_NAME,
>  		.of_match_table = of_match_ptr(s6sy761_of_match),
> -		.pm = &s6sy761_pm_ops,
> +		.pm = pm_ptr(&s6sy761_pm_ops),
>  	},
>  	.probe_new = s6sy761_probe,
>  	.remove = s6sy761_remove,
> --
> 2.39.0
>

--
Kind Regards,
Caleb


  reply	other threads:[~2023-01-16 14:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-14 17:16 [PATCH 00/16] Input: Switch to new PM macros set 3 Jonathan Cameron
2023-01-14 17:16 ` [PATCH 01/16] Input: cyapa - switch to SYSTEM_SLEEP/RUNTIME_PM_OPS() and pm_ptr() Jonathan Cameron
2023-01-14 17:16 ` [PATCH 02/16] Input: axp20x-pek - switch to SYSTEM_SLEEP_PM_OPS() and pm_sleep_ptr() Jonathan Cameron
2023-01-14 17:16 ` [PATCH 03/16] Input: samsung-keypad - switch to pm_ptr() and SYSTEM_SLEEP/RUNTIME_PM_OPS() Jonathan Cameron
2023-01-14 17:16 ` [PATCH 04/16] Input: s6sy761 - switch to SYSTEM_SLEEP_/RUNTIME_PM_OPS() and pm_ptr() Jonathan Cameron
2023-01-16 14:20   ` Caleb Connolly [this message]
2023-01-14 17:16 ` [PATCH 05/16] Input: rmi4 - switch to SYSTEM_SLEEP/RUNTIME_PM_OPS() " Jonathan Cameron
2023-01-14 17:16 ` [PATCH 06/16] Input: stmfts - switch to SYSTEM_SLEEP_/RUNTIME_PM_OPS() " Jonathan Cameron
2023-01-14 17:16 ` [PATCH 07/16] Input: ad714x - unify dev_pm_ops using EXPORT_SIMPLE_DEV_PM_OPS() Jonathan Cameron
2023-01-14 17:16 ` [PATCH 08/16] Input: adxl34x " Jonathan Cameron
2023-01-14 17:16 ` [PATCH 09/16] Input: tsc200x - use EXPORT_GPL_SIMPLE_DEV_PM_OPS() Jonathan Cameron
2023-01-14 17:16 ` [PATCH 10/16] Input: cyttsp4 - use EXPORT_GPL_RUNTIME_DEV_PM_OPS() Jonathan Cameron
2023-01-14 17:16 ` [PATCH 11/16] Input: cyttsp - use EXPORT_GPL_SIMPLE_DEV_PM_OPS() Jonathan Cameron
2023-01-14 17:16 ` [PATCH 12/16] Input: applespi - use pm_sleep_ptr() and SYSTEM_SLEEP_PM_OPS() Jonathan Cameron
2023-01-14 17:16 ` [PATCH 13/16] Input: omap4-keyad - use pm_ptr() and RUNTIME_DEV_PM_OPS() Jonathan Cameron
2023-01-14 17:16 ` [PATCH 14/16] Input: Use pm_sleep_ptr() to avoid need for ifdef CONFIG_PM_SLEEP Jonathan Cameron
2023-01-14 17:16 ` [PATCH 15/16] Input: cma3000 - use pm_sleep_ptr() to allow removal of ifdef CONFIG_PM guards Jonathan Cameron
2023-01-14 17:16 ` [PATCH 16/16] Input: wistron_btns " Jonathan Cameron
2023-01-27 22:50 ` [PATCH 00/16] Input: Switch to new PM macros set 3 Dmitry Torokhov

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=3c6c160f-4f35-859d-9f06-92477174cbb4@connolly.tech \
    --to=caleb@connolly.tech \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andi@etezian.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-input@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).