Skip to content

Commit

Permalink
hwmon: (lis3lv02d_i2c) Fix compile warnings
Browse files Browse the repository at this point in the history
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

Seen if CONFIG_PM_RUNTIME is not set.

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

Seen if CONFIG_PM is set but CONFIG_PM_SLEEP is not.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Guenter Roeck committed Nov 22, 2010
1 parent c48a291 commit 32292f4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/hwmon/lis3lv02d_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static int __devexit lis3lv02d_i2c_remove(struct i2c_client *client)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int lis3lv02d_i2c_suspend(struct device *dev)
{
struct i2c_client *client = container_of(dev, struct i2c_client, dev);
Expand All @@ -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_SLEEP */

#ifdef CONFIG_PM_RUNTIME
static int lis3_i2c_runtime_suspend(struct device *dev)
{
struct i2c_client *client = container_of(dev, struct i2c_client, dev);
Expand All @@ -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 },
Expand Down

0 comments on commit 32292f4

Please sign in to comment.