Skip to content

Commit

Permalink
mfd: Add missing #ifdef around tc3589x PM block
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Linus Walleij authored and Samuel Ortiz committed Oct 24, 2011
1 parent d8e4a88 commit 54d8e2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mfd/tc3589x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 },
Expand Down

0 comments on commit 54d8e2c

Please sign in to comment.