]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: gyro: Remove redundant pm_runtime_mark_last_busy() calls
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 25 Aug 2025 13:53:55 +0000 (16:53 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Aug 2025 15:04:47 +0000 (16:04 +0100)
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Link: https://patch.msgid.link/20250825135401.1765847-7-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/gyro/bmg160_core.c
drivers/iio/gyro/fxas21002c_core.c
drivers/iio/gyro/mpu3050-core.c
drivers/iio/gyro/mpu3050-i2c.c

index 781d3e96645ffeda0391352a1f942efe09f21cd7..38394b5f32755f4fe6eff68315c67e699b6ee401 100644 (file)
@@ -309,10 +309,8 @@ static int bmg160_set_power_state(struct bmg160_data *data, bool on)
 
        if (on)
                ret = pm_runtime_get_sync(dev);
-       else {
-               pm_runtime_mark_last_busy(dev);
+       else
                ret = pm_runtime_put_autosuspend(dev);
-       }
 
        if (ret < 0) {
                dev_err(dev, "Failed: bmg160_set_power_state for %d\n", on);
index 754c8a564ba46ad796c4fce3cf61d3eb0e806f20..a88670207cec81d31ae132cfb31251cf104f7b65 100644 (file)
@@ -373,8 +373,6 @@ static int  fxas21002c_pm_put(struct fxas21002c_data *data)
 {
        struct device *dev = regmap_get_device(data->regmap);
 
-       pm_runtime_mark_last_busy(dev);
-
        return pm_runtime_put_autosuspend(dev);
 }
 
index 16553948c5c3a40b79cb2c9663e2d42e18782fa6..67ae7d1012bc275fa2b49a0d5dc2c060ac84bb2d 100644 (file)
@@ -370,7 +370,6 @@ static int mpu3050_read_raw(struct iio_dev *indio_dev,
 
 out_read_raw_unlock:
        mutex_unlock(&mpu3050->lock);
-       pm_runtime_mark_last_busy(mpu3050->dev);
        pm_runtime_put_autosuspend(mpu3050->dev);
 
        return ret;
@@ -662,7 +661,6 @@ static int mpu3050_buffer_postdisable(struct iio_dev *indio_dev)
 {
        struct mpu3050 *mpu3050 = iio_priv(indio_dev);
 
-       pm_runtime_mark_last_busy(mpu3050->dev);
        pm_runtime_put_autosuspend(mpu3050->dev);
 
        return 0;
@@ -976,7 +974,6 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,
                if (ret)
                        dev_err(mpu3050->dev, "error resetting FIFO\n");
 
-               pm_runtime_mark_last_busy(mpu3050->dev);
                pm_runtime_put_autosuspend(mpu3050->dev);
                mpu3050->hw_irq_trigger = false;
 
index 8e284f47242c5c281769beda824652db4cda2b43..092878f2c88693696175bfd7f3ca09136a0da87a 100644 (file)
@@ -27,7 +27,6 @@ static int mpu3050_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id)
 {
        struct mpu3050 *mpu3050 = i2c_mux_priv(mux);
 
-       pm_runtime_mark_last_busy(mpu3050->dev);
        pm_runtime_put_autosuspend(mpu3050->dev);
        return 0;
 }