lkml.org 
[lkml]   [2011]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] input: fix misc/twl6040-vibra.c warning
On Mon, 29 Aug 2011 23:59:31 -0700 Dmitry Torokhov wrote:

> 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.

Ah, I see. Thanks for the info.
Do I need to resend the patch?

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***


\
 
 \ /
  Last update: 2011-08-30 23:09    [W:0.045 / U:1.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site