From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: lkml <linux-kernel@vger.kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-input@vger.kernel.org
Subject: Re: [PATCH] input: fix misc/twl6040-vibra.c warning
Date: Mon, 29 Aug 2011 23:59:31 -0700 [thread overview]
Message-ID: <20110830065931.GA5791@core.coreip.homeip.net> (raw)
In-Reply-To: <20110829125017.9337299c.rdunlap@xenotime.net>
Hi Randy,
On Mon, Aug 29, 2011 at 12:50:17PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@xenotime.net>
>
> Fix warning from Geert's build summary emails by changing "if" to
> "ifdef". Also handle the case of CONFIG_PM_SLEEP not enabled.
>
> drivers/input/misc/twl6040-vibra.c:231:5: warning: "CONFIG_PM_SLEEP" is not defined
>
> Builds cleanly with CONFIG_PM_SLEEP enabled or disabled.
>
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> ---
> drivers/input/misc/twl6040-vibra.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> --- linux-next-20110829.orig/drivers/input/misc/twl6040-vibra.c
> +++ linux-next-20110829/drivers/input/misc/twl6040-vibra.c
> @@ -228,7 +228,7 @@ static void twl6040_vibra_close(struct i
> mutex_unlock(&info->mutex);
> }
>
> -#if CONFIG_PM_SLEEP
> +#ifdef CONFIG_PM_SLEEP
This is actually the only change that is needed. In case when
CONFIG_PM_SLEEP is not defined SIMPLE_DEV_PM_OPS() produces empty
'struct dev_pm_ops' so no additional #ifdef-ing is needed.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2011-08-30 6:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-29 19:50 Randy Dunlap
2011-08-30 6:59 ` Dmitry Torokhov [this message]
2011-08-30 21:07 ` Randy Dunlap
2011-08-30 21:23 ` 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=20110830065931.GA5791@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.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
all inboxes | Powered by JetHome®