Commit 54d8e2c323b439e0e20ea44d17b875d9a43f7d66

Authored by Linus Walleij
Committed by Samuel Ortiz
1 parent d8e4a88b79

mfd: Add missing #ifdef around tc3589x PM block

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>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

drivers/mfd/tc3589x.c
... ... @@ -357,6 +357,7 @@
357 357 return 0;
358 358 }
359 359  
  360 +#ifdef CONFIG_PM
360 361 static int tc3589x_suspend(struct device *dev)
361 362 {
362 363 struct tc3589x *tc3589x = dev_get_drvdata(dev);
... ... @@ -387,6 +388,7 @@
387 388  
388 389 static const SIMPLE_DEV_PM_OPS(tc3589x_dev_pm_ops, tc3589x_suspend,
389 390 tc3589x_resume);
  391 +#endif
390 392  
391 393 static const struct i2c_device_id tc3589x_id[] = {
392 394 { "tc3589x", 24 },