]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: accel: Remove redundant pm_runtime_mark_last_busy() calls
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 25 Aug 2025 13:53:50 +0000 (16:53 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Aug 2025 14:56:12 +0000 (15:56 +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>
Link: https://patch.msgid.link/20250825135401.1765847-2-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/bmc150-accel-core.c
drivers/iio/accel/bmi088-accel-core.c
drivers/iio/accel/fxls8962af-core.c
drivers/iio/accel/kxcjk-1013.c
drivers/iio/accel/kxsd9.c
drivers/iio/accel/mma8452.c
drivers/iio/accel/mma9551_core.c
drivers/iio/accel/msa311.c

index be5fbb0c5d29ab1842b152b4fd19faae09a3c58a..3c5d1560b163df0abf2677008521a24ae261f0c0 100644 (file)
@@ -332,13 +332,10 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
        struct device *dev = regmap_get_device(data->regmap);
        int ret;
 
-       if (on) {
+       if (on)
                ret = pm_runtime_resume_and_get(dev);
-       } else {
-               pm_runtime_mark_last_busy(dev);
+       else
                ret = pm_runtime_put_autosuspend(dev);
-       }
-
        if (ret < 0) {
                dev_err(dev,
                        "Failed: %s for %d\n", __func__, on);
index dea126f993c1666a42f62a1f311b58c864349c89..c7da90af0d2d03229bb2f9136a6474d126a4b772 100644 (file)
@@ -375,7 +375,6 @@ static int bmi088_accel_read_raw(struct iio_dev *indio_dev,
        return -EINVAL;
 
 out_read_raw_pm_put:
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return ret;
@@ -419,7 +418,6 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
                        return ret;
 
                ret = bmi088_accel_set_scale(data, val, val2);
-               pm_runtime_mark_last_busy(dev);
                pm_runtime_put_autosuspend(dev);
                return ret;
        case IIO_CHAN_INFO_SAMP_FREQ:
@@ -428,7 +426,6 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
                        return ret;
 
                ret = bmi088_accel_set_sample_freq(data, val);
-               pm_runtime_mark_last_busy(dev);
                pm_runtime_put_autosuspend(dev);
                return ret;
        default:
index b10a30960e1e4c330846b20d9c48cdbe31cc0db7..8763e91c63d2bf1bf3a5f7aecd1881efa3767c12 100644 (file)
@@ -222,7 +222,6 @@ static int fxls8962af_power_off(struct fxls8962af_data *data)
        struct device *dev = regmap_get_device(data->regmap);
        int ret;
 
-       pm_runtime_mark_last_busy(dev);
        ret = pm_runtime_put_autosuspend(dev);
        if (ret)
                dev_err(dev, "failed to power off\n");
index 6aefe8221296c8f8baa3c6bebd9717e652266482..2823ddde4bf21bc1f35493d0ba14d7592e0c36b4 100644 (file)
@@ -636,10 +636,8 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
 
        if (on)
                ret = pm_runtime_resume_and_get(&data->client->dev);
-       else {
-               pm_runtime_mark_last_busy(&data->client->dev);
+       else
                ret = pm_runtime_put_autosuspend(&data->client->dev);
-       }
        if (ret < 0) {
                dev_err(&data->client->dev,
                        "Failed: %s for %d\n", __func__, on);
index cfc31265cdd0f15de3473897b1d76ae5159ba200..4717d80fc24af69f611c270d0587b5a7d8fea426 100644 (file)
@@ -151,7 +151,6 @@ static int kxsd9_write_raw(struct iio_dev *indio_dev,
                ret = kxsd9_write_scale(indio_dev, val2);
        }
 
-       pm_runtime_mark_last_busy(st->dev);
        pm_runtime_put_autosuspend(st->dev);
 
        return ret;
@@ -199,7 +198,6 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,
        }
 
 error_ret:
-       pm_runtime_mark_last_busy(st->dev);
        pm_runtime_put_autosuspend(st->dev);
 
        return ret;
@@ -250,7 +248,6 @@ static int kxsd9_buffer_postdisable(struct iio_dev *indio_dev)
 {
        struct kxsd9_state *st = iio_priv(indio_dev);
 
-       pm_runtime_mark_last_busy(st->dev);
        pm_runtime_put_autosuspend(st->dev);
 
        return 0;
index aba444a980d9dd822eaf95bff9f343fdbd50ae10..15172ba2972c590e5386189a47056bf3b1b8103a 100644 (file)
@@ -224,13 +224,10 @@ static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on)
 #ifdef CONFIG_PM
        int ret;
 
-       if (on) {
+       if (on)
                ret = pm_runtime_resume_and_get(&client->dev);
-       } else {
-               pm_runtime_mark_last_busy(&client->dev);
+       else
                ret = pm_runtime_put_autosuspend(&client->dev);
-       }
-
        if (ret < 0) {
                dev_err(&client->dev,
                        "failed to change power state to %d\n", on);
index 3e7d9b79ed0ee9c05e0c2e8b0791e356a3692b18..2ccb1fb19b966e3cd8c92ee3cf8824e89cd63bc7 100644 (file)
@@ -671,11 +671,8 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
 
        if (on)
                ret = pm_runtime_resume_and_get(&client->dev);
-       else {
-               pm_runtime_mark_last_busy(&client->dev);
+       else
                ret = pm_runtime_put_autosuspend(&client->dev);
-       }
-
        if (ret < 0) {
                dev_err(&client->dev,
                        "failed to change power state to %d\n", on);
index cded0b3a8559b2ffacebda78421e8b2734e0822d..5eace0de3750758ae184ab55434fd3febafd604d 100644 (file)
@@ -607,7 +607,6 @@ static int msa311_read_raw_data(struct iio_dev *indio_dev,
        err = msa311_get_axis(msa311, chan, &axis);
        mutex_unlock(&msa311->lock);
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        iio_device_release_direct(indio_dev);
@@ -741,7 +740,6 @@ static int msa311_write_scale(struct iio_dev *indio_dev, int val, int val2)
                        break;
                }
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        if (err)
@@ -781,7 +779,6 @@ static int msa311_write_samp_freq(struct iio_dev *indio_dev, int val, int val2)
                        break;
                }
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        iio_device_release_direct(indio_dev);
@@ -832,7 +829,6 @@ static int msa311_debugfs_reg_access(struct iio_dev *indio_dev,
 
        mutex_unlock(&msa311->lock);
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        if (err)
@@ -855,7 +851,6 @@ static int msa311_buffer_postdisable(struct iio_dev *indio_dev)
        struct msa311_priv *msa311 = iio_priv(indio_dev);
        struct device *dev = msa311->dev;
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return 0;
@@ -1229,7 +1224,6 @@ static int msa311_probe(struct i2c_client *i2c)
        if (err)
                return err;
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        err = devm_iio_device_register(dev, indio_dev);