summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/gyro/bmg160.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/gyro/bmg160.c b/drivers/iio/gyro/bmg160.c
index 80f92a65e02..99acf361aa5 100644
--- a/drivers/iio/gyro/bmg160.c
+++ b/drivers/iio/gyro/bmg160.c
@@ -237,6 +237,7 @@ static int bmg160_chip_init(struct bmg160_data *data)
static int bmg160_set_power_state(struct bmg160_data *data, bool on)
{
+#ifdef CONFIG_PM_RUNTIME
int ret;
if (on)
@@ -251,6 +252,7 @@ static int bmg160_set_power_state(struct bmg160_data *data, bool on)
"Failed: bmg160_set_power_state for %d\n", on);
return ret;
}
+#endif
return 0;
}