lkml.org 
[lkml]   [2011]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mfd/tc3589x: add missing #ifdef around PM block
Date
From: Linus Walleij <linus.walleij@linaro.org>

The CONFIG_PM code was unconditionally compiled in despite
the dev_pm_ops only being included into the driver struct
if used. Fix this by adding the missing #ifdef.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/mfd/tc3589x.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
index c27e515..de97974 100644
--- a/drivers/mfd/tc3589x.c
+++ b/drivers/mfd/tc3589x.c
@@ -357,6 +357,7 @@ static int __devexit tc3589x_remove(struct i2c_client *client)
return 0;
}

+#ifdef CONFIG_PM
static int tc3589x_suspend(struct device *dev)
{
struct tc3589x *tc3589x = dev_get_drvdata(dev);
@@ -387,6 +388,7 @@ static int tc3589x_resume(struct device *dev)

static const SIMPLE_DEV_PM_OPS(tc3589x_dev_pm_ops, tc3589x_suspend,
tc3589x_resume);
+#endif

static const struct i2c_device_id tc3589x_id[] = {
{ "tc3589x", 24 },
--
1.7.3.2


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