From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Jonathan Cameron <jic23@kernel.org>,
linux-input@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 09/32] Input: mtk-pmic-keys - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
Date: Mon, 05 Dec 2022 14:23:38 +0100 [thread overview]
Message-ID: <87a642rnl1.fsf@baylibre.com> (raw)
In-Reply-To: <20221204180841.2211588-10-jic23@kernel.org>
On Sun, Dec 04, 2022 at 18:08, Jonathan Cameron <jic23@kernel.org> wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection
> against unused function warnings. The new combination of pm_sleep_ptr()
> and DEFINE_SIMPLE_DEV_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>
> Cc: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> ---
> drivers/input/keyboard/mtk-pmic-keys.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> index 9b34da0ec260..3d4ffa25e3df 100644
> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> @@ -231,7 +231,7 @@ static int mtk_pmic_key_setup(struct mtk_pmic_keys *keys,
> return 0;
> }
>
> -static int __maybe_unused mtk_pmic_keys_suspend(struct device *dev)
> +static int mtk_pmic_keys_suspend(struct device *dev)
> {
> struct mtk_pmic_keys *keys = dev_get_drvdata(dev);
> int index;
> @@ -247,7 +247,7 @@ static int __maybe_unused mtk_pmic_keys_suspend(struct device *dev)
> return 0;
> }
>
> -static int __maybe_unused mtk_pmic_keys_resume(struct device *dev)
> +static int mtk_pmic_keys_resume(struct device *dev)
> {
> struct mtk_pmic_keys *keys = dev_get_drvdata(dev);
> int index;
> @@ -263,8 +263,8 @@ static int __maybe_unused mtk_pmic_keys_resume(struct device *dev)
> return 0;
> }
>
> -static SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend,
> - mtk_pmic_keys_resume);
> +static DEFINE_SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend,
> + mtk_pmic_keys_resume);
>
> static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = {
> {
> @@ -387,7 +387,7 @@ static struct platform_driver pmic_keys_pdrv = {
> .driver = {
> .name = "mtk-pmic-keys",
> .of_match_table = of_mtk_pmic_keys_match_tbl,
> - .pm = &mtk_pmic_keys_pm_ops,
> + .pm = pm_sleep_ptr(&mtk_pmic_keys_pm_ops),
> },
> };
>
> --
> 2.38.1
next prev parent reply other threads:[~2022-12-05 13:23 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-04 18:08 [PATCH 00/32] Input: Joystick keyboard switch to DEFINE_SIMPLE_DEV_PM_OPS() Jonathan Cameron
2022-12-04 18:08 ` [PATCH 01/32] Input: pxspad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Jonathan Cameron
2022-12-04 18:08 ` [PATCH 02/32] Input: adp5589-keys " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 03/32] Input: cros-ec-keyb " Jonathan Cameron
2022-12-07 0:41 ` Stephen Boyd
2022-12-04 18:08 ` [PATCH 04/32] Input: cypress-sf " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 05/32] Input: ep39xx-keypad " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 06/32] Input: gpio-keys " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 07/32] Input: ipaq-micro-keys " Jonathan Cameron
2022-12-06 23:43 ` Linus Walleij
2022-12-04 18:08 ` [PATCH 08/32] Input: mpr121-touchkey " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 09/32] Input: mtk-pmic-keys " Jonathan Cameron
2022-12-05 13:23 ` Mattijs Korpershoek [this message]
2022-12-04 18:08 ` [PATCH 10/32] Input: qt1050 " Jonathan Cameron
2022-12-05 8:59 ` Marco Felsch
2022-12-04 18:08 ` [PATCH 11/32] Input: spear-keyboard " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 12/32] Input: tm2-touchkey " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 13/32] Input: lm8323 " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 14/32] Input: lpc32xx-keys " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 15/32] Input: matrix-keypad " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 16/32] Input: max7359-keypad " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 17/32] Input: mcs-touchkey " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 18/32] Input: nomadik-ske-keypad " Jonathan Cameron
2022-12-06 23:43 ` Linus Walleij
2022-12-04 18:08 ` [PATCH 19/32] Input: pmic8xxx-keypad " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 20/32] Input: pxa27x_keypad " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 21/32] Input: qt1070 " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 22/32] Input: sh-keysc " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 23/32] Input: st-keyscan " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 24/32] Input: tc3589x " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 25/32] Input: tca6416-keypad " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 26/32] Input: tegra-kbc " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 27/32] Input: tegra-kbc - allow build with COMPILE_TEST Jonathan Cameron
2022-12-04 18:08 ` [PATCH 28/32] Input: spear-keyboard - improve build coverage using COMPILE_TEST Jonathan Cameron
2022-12-04 18:08 ` [PATCH 29/32] Input: pxa27xx-keypad - allow build with COMPILE_TEST Jonathan Cameron
2022-12-04 18:08 ` [PATCH 30/32] Input: nomadik-ske-keypad - allow building " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 31/32] Input: lpc32xx " Jonathan Cameron
2022-12-04 18:08 ` [PATCH 32/32] Input: pxspad: Fix unused data warning when force feedback not enabled Jonathan Cameron
2022-12-07 21:47 ` [PATCH 00/32] Input: Joystick keyboard switch to DEFINE_SIMPLE_DEV_PM_OPS() 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=87a642rnl1.fsf@baylibre.com \
--to=mkorpershoek@baylibre.com \
--cc=Jonathan.Cameron@huawei.com \
--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 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.