From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile
Date: Fri, 19 Nov 2010 16:01:35 +0000 [thread overview]
Message-ID: <20101119160135.GB25724@ericsson.com> (raw)
In-Reply-To: <20101119145510.1c59d6c4@endymion.delvare>
On Fri, Nov 19, 2010 at 10:49:29AM -0500, Jean Delvare wrote:
> Hi Guenter,
>
> On Fri, 19 Nov 2010 06:59:53 -0800, Guenter Roeck wrote:
> > This commit fixes the following compile warnings.
> >
> > From v2.6.37-rc2/m68k/m68k-allmodconfig, v2.6.37-rc2/powerpc/powerpc-randconfig:
> > drivers/hwmon/lis3lv02d_i2c.c:222: warning: 'lis3_i2c_runtime_suspend' defined but not used
> > drivers/hwmon/lis3lv02d_i2c.c:231: warning: 'lis3_i2c_runtime_resume' defined but not used
>
> Your patch definitely fixes that one.
>
> >
> > From v2.6.37-rc2/sh4/sh-allyesconfig:
> > drivers/hwmon/lis3lv02d_i2c.c:191: warning: 'lis3lv02d_i2c_suspend' defined but not used
> > drivers/hwmon/lis3lv02d_i2c.c:201: warning: 'lis3lv02d_i2c_resume' defined but not used
>
> But that one? I doubt it. If CONFIG_PM is set but CONFIG_PM_SLEEP
> isn't, it's still present. I don't think it can happen on x86, but
> apparently on sh4 it can.
>
One never stops learning. Looks like I'll have to use #ifdef CONFIG_PM_SLEEP.
Guenter
> >
> > Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
> > ---
> > Resent. Previous post did not make it to the mailing list. Also added the fixed
> > warnings.
> >
> > drivers/hwmon/lis3lv02d_i2c.c | 8 +++-----
> > 1 files changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/hwmon/lis3lv02d_i2c.c b/drivers/hwmon/lis3lv02d_i2c.c
> > index 9f4bae0..16c1f48 100644
> > --- a/drivers/hwmon/lis3lv02d_i2c.c
> > +++ b/drivers/hwmon/lis3lv02d_i2c.c
> > @@ -213,12 +213,9 @@ static int lis3lv02d_i2c_resume(struct device *dev)
> >
> > return 0;
> > }
> > -#else
> > -#define lis3lv02d_i2c_suspend NULL
> > -#define lis3lv02d_i2c_resume NULL
> > -#define lis3lv02d_i2c_shutdown NULL
> > -#endif
> > +#endif /* CONFIG_PM */
> >
> > +#ifdef CONFIG_PM_RUNTIME
> > static int lis3_i2c_runtime_suspend(struct device *dev)
> > {
> > struct i2c_client *client = container_of(dev, struct i2c_client, dev);
> > @@ -236,6 +233,7 @@ static int lis3_i2c_runtime_resume(struct device *dev)
> > lis3lv02d_poweron(lis3);
> > return 0;
> > }
> > +#endif /* CONFIG_PM_RUNTIME */
> >
> > static const struct i2c_device_id lis3lv02d_id[] = {
> > {"lis3lv02d", 0 },
>
>
> --
> Jean Delvare
--
Guenter Roeck
Distinguished Engineer
PDU IP Systems
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2010-11-19 16:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-19 13:55 [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile Jean Delvare
2010-11-19 14:42 ` Guenter Roeck
2010-11-19 14:59 ` [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile warnings if Guenter Roeck
2010-11-19 15:49 ` [lm-sensors] [PATCH] hwmon: (lis3lv02d_i2c) Fix compile Jean Delvare
2010-11-19 16:01 ` Guenter Roeck [this message]
2010-11-19 18:10 ` 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=20101119160135.GB25724@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=lm-sensors@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.