diff --git a/drivers/power/bq24190_charger.c b/drivers/power/bq24190_charger.c index cc7227a7251e72..bda048c4e83139 100644 --- a/drivers/power/bq24190_charger.c +++ b/drivers/power/bq24190_charger.c @@ -8,6 +8,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -1110,7 +1111,7 @@ static int bq24190_battery_set_property(struct power_supply *psy, dev_dbg(bdi->dev, "prop: %d\n", psp); - pm_runtime_put_sync(bdi->dev); + pm_runtime_get_sync(bdi->dev); switch (psp) { case POWER_SUPPLY_PROP_ONLINE: @@ -1384,6 +1385,7 @@ static int bq24190_probe(struct i2c_client *client, pm_runtime_enable(dev); pm_runtime_resume(dev); + dev_pm_enable_wake_irq(dev); ret = bq24190_hw_init(bdi); if (ret < 0) { diff --git a/include/linux/pm_wakeirq.h b/include/linux/pm_wakeirq.h index cd5b62db908454..49c2220fb24535 100644 --- a/include/linux/pm_wakeirq.h +++ b/include/linux/pm_wakeirq.h @@ -14,6 +14,8 @@ #ifndef _LINUX_PM_WAKEIRQ_H #define _LINUX_PM_WAKEIRQ_H +struct device; + #ifdef CONFIG_PM extern int dev_pm_set_wake_irq(struct device *dev, int irq);