From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mx25: Add basic suspend/resume support
Date: Tue, 02 Feb 2016 22:34:22 +0100 [thread overview]
Message-ID: <4987443.OL55qNe4Wb@wuerfel> (raw)
In-Reply-To: <1454447886-4045-1-git-send-email-festevam@gmail.com>
On Tuesday 02 February 2016 19:18:06 Fabio Estevam wrote:
> +#ifdef CONFIG_PM
> +static int imx25_suspend_enter(suspend_state_t state)
> +{
> + switch (state) {
> + case PM_SUSPEND_MEM:
> + cpu_do_idle();
> + break;
> + default:
> + return -EINVAL;
> + }
> +
> + return 0;
> +}
> +#else
> +static inline int imx25_suspend_enter(suspend_state_t state)
> +{
> + return 0;
> +}
> +#endif
>
Better remove the #ifdef by doing
void __init imx25_pm_init(void)
{
if (IS_ENABLED(CONFIG_PM))
suspend_set_ops(&imx25_suspend_ops);
}
or put the IS_ENABLED() check inside of imx25_suspend_enter().
Arnd
next prev parent reply other threads:[~2016-02-02 21:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 21:18 [PATCH] ARM: mx25: Add basic suspend/resume support Fabio Estevam
2016-02-02 21:34 ` Arnd Bergmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-06-25 19:19 Fabio Estevam
2014-07-01 6:32 ` Shawn Guo
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=4987443.OL55qNe4Wb@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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