Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32292f49 authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (lis3lv02d_i2c) Fix compile warnings



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: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
parent c48a2916
Loading
Loading
Loading
Loading
+4 −6
Original line number Original line Diff line number Diff line
@@ -186,7 +186,7 @@ static int __devexit lis3lv02d_i2c_remove(struct i2c_client *client)
	return 0;
	return 0;
}
}


#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int lis3lv02d_i2c_suspend(struct device *dev)
static int lis3lv02d_i2c_suspend(struct device *dev)
{
{
	struct i2c_client *client = container_of(dev, struct i2c_client, dev);
	struct i2c_client *client = container_of(dev, struct i2c_client, dev);
@@ -213,12 +213,9 @@ static int lis3lv02d_i2c_resume(struct device *dev)


	return 0;
	return 0;
}
}
#else
#endif /* CONFIG_PM_SLEEP */
#define lis3lv02d_i2c_suspend	NULL
#define lis3lv02d_i2c_resume	NULL
#define lis3lv02d_i2c_shutdown	NULL
#endif


#ifdef CONFIG_PM_RUNTIME
static int lis3_i2c_runtime_suspend(struct device *dev)
static int lis3_i2c_runtime_suspend(struct device *dev)
{
{
	struct i2c_client *client = container_of(dev, struct i2c_client, 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);
	lis3lv02d_poweron(lis3);
	return 0;
	return 0;
}
}
#endif /* CONFIG_PM_RUNTIME */


static const struct i2c_device_id lis3lv02d_id[] = {
static const struct i2c_device_id lis3lv02d_id[] = {
	{"lis3lv02d", 0 },
	{"lis3lv02d", 0 },