[PATCH 35/51] power: Switch to __pm_runtime_put_autosuspend()

From: Sakari Ailus
Date: Fri Oct 04 2024 - 05:44:12 EST


pm_runtime_put_autosuspend() will soon be changed to include a call to
pm_runtime_mark_last_busy(). This patch switches the current users to
__pm_runtime_put_autosuspend() which will continue to have the
functionality of old pm_runtime_put_autosuspend().

Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
---
drivers/power/supply/bq24190_charger.c | 28 +++++++++++++-------------
drivers/power/supply/twl4030_charger.c | 2 +-
2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index 2b393eb5c282..526387a5faeb 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -502,7 +502,7 @@ static ssize_t bq24190_sysfs_show(struct device *dev,
count = sysfs_emit(buf, "%hhx\n", v);

pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);

return count;
}
@@ -533,7 +533,7 @@ static ssize_t bq24190_sysfs_store(struct device *dev,
count = ret;

pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);

return count;
}
@@ -560,7 +560,7 @@ static int bq24190_set_otg_vbus(struct bq24190_dev_info *bdi, bool enable)
ret = bq24190_charger_set_charge_type(bdi, &val);

pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);

return ret;
}
@@ -597,7 +597,7 @@ static int bq24296_set_otg_vbus(struct bq24190_dev_info *bdi, bool enable)

out:
pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);

return ret;
}
@@ -630,7 +630,7 @@ static int bq24190_vbus_is_enabled(struct regulator_dev *dev)
BQ24190_REG_POC_CHG_CONFIG_SHIFT, &val);

pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);

if (ret)
return ret;
@@ -667,7 +667,7 @@ static int bq24296_vbus_is_enabled(struct regulator_dev *dev)
BQ24296_REG_POC_OTG_CONFIG_SHIFT, &val);

pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);

if (ret)
return ret;
@@ -1367,7 +1367,7 @@ static int bq24190_charger_get_property(struct power_supply *psy,
}

pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);

return ret;
}
@@ -1409,7 +1409,7 @@ static int bq24190_charger_set_property(struct power_supply *psy,
}

pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);

return ret;
}
@@ -1667,7 +1667,7 @@ static int bq24190_battery_get_property(struct power_supply *psy,
}

pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);

return ret;
}
@@ -1698,7 +1698,7 @@ static int bq24190_battery_set_property(struct power_supply *psy,
}

pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);

return ret;
}
@@ -1846,7 +1846,7 @@ static irqreturn_t bq24190_irq_handler_thread(int irq, void *data)
}
bq24190_check_status(bdi);
pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);
bdi->irq_event = false;

return IRQ_HANDLED;
@@ -2148,7 +2148,7 @@ static int bq24190_probe(struct i2c_client *client)
enable_irq_wake(client->irq);

pm_runtime_mark_last_busy(dev);
- pm_runtime_put_autosuspend(dev);
+ __pm_runtime_put_autosuspend(dev);

return 0;

@@ -2235,7 +2235,7 @@ static __maybe_unused int bq24190_pm_suspend(struct device *dev)

if (error >= 0) {
pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);
}

return 0;
@@ -2260,7 +2260,7 @@ static __maybe_unused int bq24190_pm_resume(struct device *dev)

if (error >= 0) {
pm_runtime_mark_last_busy(bdi->dev);
- pm_runtime_put_autosuspend(bdi->dev);
+ __pm_runtime_put_autosuspend(bdi->dev);
}

/* Things may have changed while suspended so alert upper layer */
diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c
index f3f1a0862e93..1060a3b0d285 100644
--- a/drivers/power/supply/twl4030_charger.c
+++ b/drivers/power/supply/twl4030_charger.c
@@ -513,7 +513,7 @@ static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable)
TWL4030_BCIMDKEY);
if (bci->usb_enabled) {
pm_runtime_mark_last_busy(bci->transceiver->dev);
- pm_runtime_put_autosuspend(bci->transceiver->dev);
+ __pm_runtime_put_autosuspend(bci->transceiver->dev);
bci->usb_enabled = 0;
}
bci->usb_cur = 0;
--
2.39.5