From: Guenter Roeck <linux@roeck-us•net>
To: Anson Huang <Anson.Huang@nxp•com>
Cc: linux-watchdog@vger•kernel.org, shawnguo@kernel•org,
s.hauer@pengutronix•de, linux-kernel@vger•kernel.org,
Linux-imx@nxp•com, kernel@pengutronix•de, wim@linux-watchdog•org,
festevam@gmail•com, linux-arm-kernel@lists•infradead.org
Subject: Re: [PATCH 2/3] watchdog: imx2_wdt: Use __maybe_unused instead of #if CONFIG_PM_SLEEP
Date: Mon, 30 Sep 2019 06:17:32 -0700 [thread overview]
Message-ID: <20190930131732.GB29750@roeck-us.net> (raw)
In-Reply-To: <1569308828-8320-2-git-send-email-Anson.Huang@nxp.com>
On Tue, Sep 24, 2019 at 03:07:07PM +0800, Anson Huang wrote:
> Use __maybe_unused for power management related functions instead
> of #if CONFIG_PM_SLEEP to simply the code.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp•com>
Reviewed-by: Guenter Roeck <linux@roeck-us•net>
> ---
> drivers/watchdog/imx2_wdt.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 6711b4e..034f32c 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -358,9 +358,8 @@ static void imx2_wdt_shutdown(struct platform_device *pdev)
> }
> }
>
> -#ifdef CONFIG_PM_SLEEP
> /* Disable watchdog if it is active or non-active but still running */
> -static int imx2_wdt_suspend(struct device *dev)
> +static int __maybe_unused imx2_wdt_suspend(struct device *dev)
> {
> struct watchdog_device *wdog = dev_get_drvdata(dev);
> struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog);
> @@ -381,7 +380,7 @@ static int imx2_wdt_suspend(struct device *dev)
> }
>
> /* Enable watchdog and configure it if necessary */
> -static int imx2_wdt_resume(struct device *dev)
> +static int __maybe_unused imx2_wdt_resume(struct device *dev)
> {
> struct watchdog_device *wdog = dev_get_drvdata(dev);
> struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog);
> @@ -406,7 +405,6 @@ static int imx2_wdt_resume(struct device *dev)
>
> return 0;
> }
> -#endif
>
> static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_wdt_suspend,
> imx2_wdt_resume);
> --
> 2.7.4
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-09-30 13:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 7:07 [PATCH 1/3] watchdog: imx2_wdt: Remove unnecessary blank line Anson Huang
2019-09-24 7:07 ` [PATCH 2/3] watchdog: imx2_wdt: Use __maybe_unused instead of #if CONFIG_PM_SLEEP Anson Huang
2019-09-30 13:17 ` Guenter Roeck [this message]
2019-09-24 7:07 ` [PATCH 3/3] watchdog: imx2_wdt: Use 'dev' instead of dereferencing it repeatedly Anson Huang
2019-09-30 13:18 ` Guenter Roeck
2019-09-30 13:17 ` [PATCH 1/3] watchdog: imx2_wdt: Remove unnecessary blank line Guenter Roeck
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=20190930131732.GB29750@roeck-us.net \
--to=linux@roeck-us$(echo .)net \
--cc=Anson.Huang@nxp$(echo .)com \
--cc=Linux-imx@nxp$(echo .)com \
--cc=festevam@gmail$(echo .)com \
--cc=kernel@pengutronix$(echo .)de \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-watchdog@vger$(echo .)kernel.org \
--cc=s.hauer@pengutronix$(echo .)de \
--cc=shawnguo@kernel$(echo .)org \
--cc=wim@linux-watchdog$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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