]> www.infradead.org Git - users/griffoul/linux.git/commitdiff
media: Remove redundant pm_runtime_mark_last_busy() calls
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 9 Jul 2025 19:53:48 +0000 (22:53 +0300)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 18 Aug 2025 07:55:08 +0000 (09:55 +0200)
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().

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Thierry Reding <treding@nvidia.com> (tegra-vde/h264.c)
Acked-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> (alvium-csi2.c)
Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com> (iris_hfi_queue.c)
Reviewed-by: Sean Young <sean@mess.org>
Acked-by: Dave Stevenson <dave.stevenson@raspberrypi.com> (imx219.c)
Acked-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
29 files changed:
drivers/media/i2c/alvium-csi2.c
drivers/media/i2c/ccs/ccs-core.c
drivers/media/i2c/dw9768.c
drivers/media/i2c/gc0308.c
drivers/media/i2c/gc2145.c
drivers/media/i2c/imx219.c
drivers/media/i2c/imx283.c
drivers/media/i2c/imx290.c
drivers/media/i2c/imx296.c
drivers/media/i2c/imx415.c
drivers/media/i2c/mt9m114.c
drivers/media/i2c/ov4689.c
drivers/media/i2c/ov5640.c
drivers/media/i2c/ov5645.c
drivers/media/i2c/ov64a40.c
drivers/media/i2c/ov8858.c
drivers/media/i2c/st-mipid02.c
drivers/media/i2c/tc358746.c
drivers/media/i2c/thp7312.c
drivers/media/i2c/vd55g1.c
drivers/media/i2c/vd56g3.c
drivers/media/i2c/video-i2c.c
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
drivers/media/platform/nvidia/tegra-vde/h264.c
drivers/media/platform/qcom/iris/iris_hfi_queue.c
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
drivers/media/platform/verisilicon/hantro_drv.c
drivers/media/rc/gpio-ir-recv.c

index 05b708bd0a641c7ca51b199bd326a724dde7559a..1f088acecf367b9b90961f8e34282f9123b922a3 100644 (file)
@@ -1841,7 +1841,6 @@ static int alvium_s_stream(struct v4l2_subdev *sd, int enable)
 
        } else {
                alvium_set_stream_mipi(alvium, enable);
-               pm_runtime_mark_last_busy(&client->dev);
                pm_runtime_put_autosuspend(&client->dev);
        }
 
index 487bcabb4a199b7aea34fb9b512c87a2f7d04e26..1c889c878abd3aeb1b7a887cff29b5eb864ab057 100644 (file)
@@ -787,10 +787,8 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
                rval = -EINVAL;
        }
 
-       if (pm_status > 0) {
-               pm_runtime_mark_last_busy(&client->dev);
+       if (pm_status > 0)
                pm_runtime_put_autosuspend(&client->dev);
-       }
 
        return rval;
 }
@@ -1914,7 +1912,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
        if (!enable) {
                ccs_stop_streaming(sensor);
                sensor->streaming = false;
-               pm_runtime_mark_last_busy(&client->dev);
                pm_runtime_put_autosuspend(&client->dev);
 
                return 0;
@@ -1929,7 +1926,6 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
        rval = ccs_start_streaming(sensor);
        if (rval < 0) {
                sensor->streaming = false;
-               pm_runtime_mark_last_busy(&client->dev);
                pm_runtime_put_autosuspend(&client->dev);
        }
 
@@ -2677,7 +2673,6 @@ nvm_show(struct device *dev, struct device_attribute *attr, char *buf)
                return -ENODEV;
        }
 
-       pm_runtime_mark_last_busy(&client->dev);
        pm_runtime_put_autosuspend(&client->dev);
 
        /*
index 3a4d100b9199f3dfab2c9750789a62938662f054..d434721ba8edeb3043293f890e7e55c517a99b1e 100644 (file)
@@ -374,7 +374,6 @@ static int dw9768_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 
 static int dw9768_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 {
-       pm_runtime_mark_last_busy(sd->dev);
        pm_runtime_put_autosuspend(sd->dev);
 
        return 0;
index 069f42785b3c503d6e44ff7fd2b8a01099a98783..cbcda0e18ff10b7b3d7086ac9869dbf8ffeb6306 100644 (file)
@@ -974,7 +974,6 @@ static int gc0308_s_ctrl(struct v4l2_ctrl *ctrl)
        if (ret)
                dev_err(gc0308->dev, "failed to set control: %d\n", ret);
 
-       pm_runtime_mark_last_busy(gc0308->dev);
        pm_runtime_put_autosuspend(gc0308->dev);
 
        return ret;
@@ -1157,14 +1156,12 @@ static int gc0308_start_stream(struct gc0308 *gc0308)
        return 0;
 
 disable_pm:
-       pm_runtime_mark_last_busy(gc0308->dev);
        pm_runtime_put_autosuspend(gc0308->dev);
        return ret;
 }
 
 static int gc0308_stop_stream(struct gc0308 *gc0308)
 {
-       pm_runtime_mark_last_busy(gc0308->dev);
        pm_runtime_put_autosuspend(gc0308->dev);
        return 0;
 }
index ba02161d46e723d14e8670ef89ba10b270d7d178..559a851669aaf57cfba4d8834d04de9a3e3d91e0 100644 (file)
@@ -963,7 +963,6 @@ static int gc2145_enable_streams(struct v4l2_subdev *sd,
        return 0;
 
 err_rpm_put:
-       pm_runtime_mark_last_busy(&client->dev);
        pm_runtime_put_autosuspend(&client->dev);
        return ret;
 }
@@ -985,7 +984,6 @@ static int gc2145_disable_streams(struct v4l2_subdev *sd,
        if (ret)
                dev_err(&client->dev, "%s failed to write regs\n", __func__);
 
-       pm_runtime_mark_last_busy(&client->dev);
        pm_runtime_put_autosuspend(&client->dev);
 
        return ret;
@@ -1193,7 +1191,6 @@ static int gc2145_s_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(&client->dev);
        pm_runtime_put_autosuspend(&client->dev);
 
        return ret;
index 3b4f68543342274ff1769e0ce164f3d5b3cb935c..3faf48f34af4d12c16fbc6eb7003e7dfd968da82 100644 (file)
@@ -771,7 +771,6 @@ static int imx219_enable_streams(struct v4l2_subdev *sd,
        return 0;
 
 err_rpm_put:
-       pm_runtime_mark_last_busy(&client->dev);
        pm_runtime_put_autosuspend(&client->dev);
        return ret;
 }
@@ -793,7 +792,6 @@ static int imx219_disable_streams(struct v4l2_subdev *sd,
        __v4l2_ctrl_grab(imx219->vflip, false);
        __v4l2_ctrl_grab(imx219->hflip, false);
 
-       pm_runtime_mark_last_busy(&client->dev);
        pm_runtime_put_autosuspend(&client->dev);
 
        return ret;
index da618c8cbadc3bff9165c6e50ef66aaa29bf5104..67e8bb432d1095d8eb435d7b5085e3da23cf70f7 100644 (file)
@@ -1143,7 +1143,6 @@ static int imx283_enable_streams(struct v4l2_subdev *sd,
        return 0;
 
 err_rpm_put:
-       pm_runtime_mark_last_busy(imx283->dev);
        pm_runtime_put_autosuspend(imx283->dev);
 
        return ret;
@@ -1163,7 +1162,6 @@ static int imx283_disable_streams(struct v4l2_subdev *sd,
        if (ret)
                dev_err(imx283->dev, "Failed to stop stream\n");
 
-       pm_runtime_mark_last_busy(imx283->dev);
        pm_runtime_put_autosuspend(imx283->dev);
 
        return ret;
@@ -1558,7 +1556,6 @@ static int imx283_probe(struct i2c_client *client)
         * Decrease the PM usage count. The device will get suspended after the
         * autosuspend delay, turning the power off.
         */
-       pm_runtime_mark_last_busy(imx283->dev);
        pm_runtime_put_autosuspend(imx283->dev);
 
        return 0;
index 4f3f386c53534adc7cd0f4242143bc8142da11d4..ec172556612eeac49bbd94fba09493f155eddd5c 100644 (file)
@@ -869,7 +869,6 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(imx290->dev);
        pm_runtime_put_autosuspend(imx290->dev);
 
        return ret;
@@ -1099,7 +1098,6 @@ static int imx290_set_stream(struct v4l2_subdev *sd, int enable)
                }
        } else {
                imx290_stop_streaming(imx290);
-               pm_runtime_mark_last_busy(imx290->dev);
                pm_runtime_put_autosuspend(imx290->dev);
        }
 
@@ -1294,7 +1292,6 @@ static int imx290_subdev_init(struct imx290 *imx290)
         * will already be prevented even before the delay.
         */
        v4l2_i2c_subdev_init(&imx290->sd, client, &imx290_subdev_ops);
-       pm_runtime_mark_last_busy(imx290->dev);
        pm_runtime_put_autosuspend(imx290->dev);
 
        imx290->sd.internal_ops = &imx290_internal_ops;
index f3bec16b527c445d6e82e7dcef6f63ffe3b43d2e..61116f4e3f7614119ad008ff0eaf472ff0ee199b 100644 (file)
@@ -604,7 +604,6 @@ static int imx296_s_stream(struct v4l2_subdev *sd, int enable)
        if (!enable) {
                ret = imx296_stream_off(sensor);
 
-               pm_runtime_mark_last_busy(sensor->dev);
                pm_runtime_put_autosuspend(sensor->dev);
 
                goto unlock;
index 278e743646ea15819d5a79577e786b47c259dbfa..276bf4d6f39d1c70dd441e1067154d8e1d9552b8 100644 (file)
@@ -952,7 +952,6 @@ static int imx415_s_stream(struct v4l2_subdev *sd, int enable)
        if (!enable) {
                ret = imx415_stream_off(sensor);
 
-               pm_runtime_mark_last_busy(sensor->dev);
                pm_runtime_put_autosuspend(sensor->dev);
 
                goto unlock;
index 3f540ca40f3c8d28d9eb05d74714943763afa8d4..aa3fd6c6c76c802e2929b401b4916fed36abcff4 100644 (file)
@@ -974,7 +974,6 @@ static int mt9m114_start_streaming(struct mt9m114 *sensor,
        return 0;
 
 error:
-       pm_runtime_mark_last_busy(&sensor->client->dev);
        pm_runtime_put_autosuspend(&sensor->client->dev);
 
        return ret;
@@ -988,7 +987,6 @@ static int mt9m114_stop_streaming(struct mt9m114 *sensor)
 
        ret = mt9m114_set_state(sensor, MT9M114_SYS_STATE_ENTER_SUSPEND);
 
-       pm_runtime_mark_last_busy(&sensor->client->dev);
        pm_runtime_put_autosuspend(&sensor->client->dev);
 
        return ret;
@@ -1046,7 +1044,6 @@ static int mt9m114_pa_g_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(&sensor->client->dev);
        pm_runtime_put_autosuspend(&sensor->client->dev);
 
        return ret;
@@ -1113,7 +1110,6 @@ static int mt9m114_pa_s_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(&sensor->client->dev);
        pm_runtime_put_autosuspend(&sensor->client->dev);
 
        return ret;
@@ -1565,7 +1561,6 @@ static int mt9m114_ifp_s_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(&sensor->client->dev);
        pm_runtime_put_autosuspend(&sensor->client->dev);
 
        return ret;
@@ -2472,7 +2467,6 @@ static int mt9m114_probe(struct i2c_client *client)
         * Decrease the PM usage count. The device will get suspended after the
         * autosuspend delay, turning the power off.
         */
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return 0;
index 1c3a449f935462400001aa46a4be2c391ca0e300..7d740ad3926f97141d3786dc28445195b9bdba0e 100644 (file)
@@ -497,7 +497,6 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
        } else {
                cci_write(ov4689->regmap, OV4689_REG_CTRL_MODE,
                          OV4689_MODE_SW_STANDBY, NULL);
-               pm_runtime_mark_last_busy(dev);
                pm_runtime_put_autosuspend(dev);
        }
 
@@ -702,7 +701,6 @@ static int ov4689_set_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return ret;
@@ -999,7 +997,6 @@ static int ov4689_probe(struct i2c_client *client)
                goto err_clean_subdev_pm;
        }
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return 0;
index 0dae0438aa80859aea7f2a3f0be5315ae1bc611a..84198613381d6013ea6d72a96e38a83eadafa7b4 100644 (file)
@@ -3341,7 +3341,6 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
        pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
        return 0;
@@ -3417,7 +3416,6 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
        pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
        return ret;
@@ -3754,7 +3752,6 @@ out:
        mutex_unlock(&sensor->lock);
 
        if (!enable || ret) {
-               pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
                pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
        }
 
@@ -3965,7 +3962,6 @@ static int ov5640_probe(struct i2c_client *client)
 
        pm_runtime_set_autosuspend_delay(dev, 1000);
        pm_runtime_use_autosuspend(dev);
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return 0;
index 004d0ee5c3f5764942b8eadcf03c6a0cc344db6d..58c846a44376528670776eeeb1a6d248d5d3ccb3 100644 (file)
@@ -808,7 +808,6 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(ov5645->dev);
        pm_runtime_put_autosuspend(ov5645->dev);
 
        return ret;
@@ -979,7 +978,6 @@ static int ov5645_disable_streams(struct v4l2_subdev *sd,
                               OV5645_SYSTEM_CTRL0_STOP);
 
 rpm_put:
-       pm_runtime_mark_last_busy(ov5645->dev);
        pm_runtime_put_autosuspend(ov5645->dev);
 
        return ret;
@@ -1196,7 +1194,6 @@ static int ov5645_probe(struct i2c_client *client)
 
        pm_runtime_set_autosuspend_delay(dev, 1000);
        pm_runtime_use_autosuspend(dev);
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return 0;
index a5da4fe47e0b091b5b53bd4ced02c5c796dd0798..2031cbd05c26979614605d2a781b76b92665e3a9 100644 (file)
@@ -2990,7 +2990,6 @@ static int ov64a40_start_streaming(struct ov64a40 *ov64a40,
        return 0;
 
 error_power_off:
-       pm_runtime_mark_last_busy(ov64a40->dev);
        pm_runtime_put_autosuspend(ov64a40->dev);
 
        return ret;
@@ -3000,7 +2999,6 @@ static int ov64a40_stop_streaming(struct ov64a40 *ov64a40,
                                  struct v4l2_subdev_state *state)
 {
        cci_update_bits(ov64a40->cci, OV64A40_REG_SMIA, BIT(0), 0, NULL);
-       pm_runtime_mark_last_busy(ov64a40->dev);
        pm_runtime_put_autosuspend(ov64a40->dev);
 
        __v4l2_ctrl_grab(ov64a40->link_freq, false);
@@ -3329,10 +3327,8 @@ static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       if (pm_status > 0) {
-               pm_runtime_mark_last_busy(ov64a40->dev);
+       if (pm_status > 0)
                pm_runtime_put_autosuspend(ov64a40->dev);
-       }
 
        return ret;
 }
@@ -3622,7 +3618,6 @@ static int ov64a40_probe(struct i2c_client *client)
                goto error_subdev_cleanup;
        }
 
-       pm_runtime_mark_last_busy(&client->dev);
        pm_runtime_put_autosuspend(&client->dev);
 
        return 0;
index 95f9ae7948463e95ce0b2cb58195de02ee72c02a..6b7193eaea1f2a06fd41da6da1819a4d20eee2d2 100644 (file)
@@ -1391,7 +1391,6 @@ static int ov8858_s_stream(struct v4l2_subdev *sd, int on)
                }
        } else {
                ov8858_stop_stream(ov8858);
-               pm_runtime_mark_last_busy(&client->dev);
                pm_runtime_put_autosuspend(&client->dev);
        }
 
@@ -1945,7 +1944,6 @@ static int ov8858_probe(struct i2c_client *client)
                goto err_power_off;
        }
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        return 0;
index f4568e87f0187dc669b6cd6ae924ad866bcc35b3..41ae25b0911f02517f137d6b5307d13154266e07 100644 (file)
@@ -465,7 +465,6 @@ static int mipid02_disable_streams(struct v4l2_subdev *sd,
        if (ret)
                goto error;
 
-       pm_runtime_mark_last_busy(&client->dev);
        pm_runtime_put_autosuspend(&client->dev);
 
 error:
@@ -542,7 +541,6 @@ error:
        cci_write(bridge->regmap, MIPID02_DATA_LANE0_REG1, 0, &ret);
        cci_write(bridge->regmap, MIPID02_DATA_LANE1_REG1, 0, &ret);
 
-       pm_runtime_mark_last_busy(&client->dev);
        pm_runtime_put_autosuspend(&client->dev);
        return ret;
 }
index 143aa1359aba51c2a36e8800e7c1149698268ca1..bcfc274cf891774b45797a8e51939232de2db2bf 100644 (file)
@@ -816,7 +816,6 @@ static int tc358746_s_stream(struct v4l2_subdev *sd, int enable)
                return 0;
 
 err_out:
-               pm_runtime_mark_last_busy(sd->dev);
                pm_runtime_put_sync_autosuspend(sd->dev);
 
                return err;
@@ -838,7 +837,6 @@ err_out:
        if (err)
                return err;
 
-       pm_runtime_mark_last_busy(sd->dev);
        pm_runtime_put_sync_autosuspend(sd->dev);
 
        return v4l2_subdev_call(src, video, s_stream, 0);
@@ -1016,7 +1014,6 @@ tc358746_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
        err = tc358746_read(tc358746, reg->reg, &val);
        reg->val = val;
 
-       pm_runtime_mark_last_busy(sd->dev);
        pm_runtime_put_sync_autosuspend(sd->dev);
 
        return err;
@@ -1032,7 +1029,6 @@ tc358746_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
 
        tc358746_write(tc358746, (u32)reg->reg, (u32)reg->val);
 
-       pm_runtime_mark_last_busy(sd->dev);
        pm_runtime_put_sync_autosuspend(sd->dev);
 
        return 0;
@@ -1395,7 +1391,6 @@ static int tc358746_init_hw(struct tc358746 *tc358746)
        }
 
        err = tc358746_read(tc358746, CHIPID_REG, &val);
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_sync_autosuspend(dev);
        if (err)
                return -ENODEV;
index 8852c56431fe3ffe29ad6b0802cce8694caaef23..775cfba188d81d85eb8d99b780efc95a0783d684 100644 (file)
@@ -808,7 +808,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
        if (!enable) {
                thp7312_stream_enable(thp7312, false);
 
-               pm_runtime_mark_last_busy(thp7312->dev);
                pm_runtime_put_autosuspend(thp7312->dev);
 
                v4l2_subdev_unlock_state(sd_state);
@@ -839,7 +838,6 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
        goto finish_unlock;
 
 finish_pm:
-       pm_runtime_mark_last_busy(thp7312->dev);
        pm_runtime_put_autosuspend(thp7312->dev);
 finish_unlock:
        v4l2_subdev_unlock_state(sd_state);
@@ -1147,7 +1145,6 @@ static int thp7312_s_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(thp7312->dev);
        pm_runtime_put_autosuspend(thp7312->dev);
 
        return ret;
@@ -2183,7 +2180,6 @@ static int thp7312_probe(struct i2c_client *client)
         * Decrease the PM usage count. The device will get suspended after the
         * autosuspend delay, turning the power off.
         */
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        dev_info(dev, "THP7312 firmware version %02u.%02u\n",
index c0754fd03b1d5e947dc5e24e9f54d98a67a23376..7c39183dd44bfee1a1d8f61f11d95701f189dbe4 100644 (file)
@@ -1104,7 +1104,6 @@ static int vd55g1_disable_streams(struct v4l2_subdev *sd,
 
        vd55g1_grab_ctrls(sensor, false);
 
-       pm_runtime_mark_last_busy(sensor->dev);
        pm_runtime_put_autosuspend(sensor->dev);
 
        return ret;
@@ -1338,7 +1337,6 @@ static int vd55g1_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(sensor->dev);
        pm_runtime_put_autosuspend(sensor->dev);
 
        return ret;
@@ -1433,7 +1431,6 @@ static int vd55g1_s_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(sensor->dev);
        pm_runtime_put_autosuspend(sensor->dev);
 
        return ret;
@@ -1895,7 +1892,6 @@ static int vd55g1_probe(struct i2c_client *client)
        pm_runtime_enable(dev);
        pm_runtime_set_autosuspend_delay(dev, 4000);
        pm_runtime_use_autosuspend(dev);
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        ret = vd55g1_subdev_init(sensor);
index 5d951ad0b478fac56983b3e0d3b0dc76f04cad8d..d66e21ba4498fb3f0c69373c19bf98eb63cefe9d 100644 (file)
@@ -493,7 +493,6 @@ static int vd56g3_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(sensor->dev);
        pm_runtime_put_autosuspend(sensor->dev);
 
        return ret;
@@ -577,7 +576,6 @@ static int vd56g3_s_ctrl(struct v4l2_ctrl *ctrl)
                break;
        }
 
-       pm_runtime_mark_last_busy(sensor->dev);
        pm_runtime_put_autosuspend(sensor->dev);
 
        return ret;
@@ -1021,7 +1019,6 @@ static int vd56g3_disable_streams(struct v4l2_subdev *sd,
        __v4l2_ctrl_grab(sensor->vflip_ctrl, false);
        __v4l2_ctrl_grab(sensor->patgen_ctrl, false);
 
-       pm_runtime_mark_last_busy(sensor->dev);
        pm_runtime_put_autosuspend(sensor->dev);
 
        return ret;
@@ -1527,7 +1524,6 @@ static int vd56g3_probe(struct i2c_client *client)
        }
 
        /* Sensor could now be powered off (after the autosuspend delay) */
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        dev_dbg(dev, "Successfully probe %s sensor\n",
index 0dd991d70d538050731c0106533d6f0618853b1f..1eee2d4f5b40ec334bd8a49b123322953bd406a4 100644 (file)
@@ -288,7 +288,6 @@ static int amg88xx_read(struct device *dev, enum hwmon_sensor_types type,
                return tmp;
 
        tmp = regmap_bulk_read(data->regmap, AMG88XX_REG_TTHL, &buf, 2);
-       pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
        pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
        if (tmp)
                return tmp;
@@ -527,7 +526,6 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
                return 0;
 
 error_rpm_put:
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 error_del_list:
        video_i2c_del_list(vq, VB2_BUF_STATE_QUEUED);
@@ -544,7 +542,6 @@ static void stop_streaming(struct vb2_queue *vq)
 
        kthread_stop(data->kthread_vid_cap);
        data->kthread_vid_cap = NULL;
-       pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
        pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 
        video_i2c_del_list(vq, VB2_BUF_STATE_ERROR);
@@ -853,7 +850,6 @@ static int video_i2c_probe(struct i2c_client *client)
        if (ret < 0)
                goto error_pm_disable;
 
-       pm_runtime_mark_last_busy(&client->dev);
        pm_runtime_put_autosuspend(&client->dev);
 
        return 0;
index fd71f0c43ac37a0bb56f669d4b89d6054cb181d5..a9ce032cc5a22386a5d24e8e73a061426b721cfe 100644 (file)
@@ -451,7 +451,6 @@ static void wave5_vpu_dec_finish_decode(struct vpu_instance *inst)
        if (q_status.report_queue_count == 0 &&
            (q_status.instance_queue_count == 0 || dec_info.sequence_changed)) {
                dev_dbg(inst->dev->dev, "%s: finishing job.\n", __func__);
-               pm_runtime_mark_last_busy(inst->dev->dev);
                pm_runtime_put_autosuspend(inst->dev->dev);
                v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
        }
@@ -1364,7 +1363,6 @@ static int wave5_vpu_dec_start_streaming(struct vb2_queue *q, unsigned int count
                }
 
        }
-       pm_runtime_mark_last_busy(inst->dev->dev);
        pm_runtime_put_autosuspend(inst->dev->dev);
        return ret;
 
@@ -1498,7 +1496,6 @@ static void wave5_vpu_dec_stop_streaming(struct vb2_queue *q)
        else
                streamoff_capture(q);
 
-       pm_runtime_mark_last_busy(inst->dev->dev);
        pm_runtime_put_autosuspend(inst->dev->dev);
 }
 
@@ -1662,7 +1659,6 @@ static void wave5_vpu_dec_device_run(void *priv)
 
 finish_job_and_return:
        dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
-       pm_runtime_mark_last_busy(inst->dev->dev);
        pm_runtime_put_autosuspend(inst->dev->dev);
        v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
 }
index 1e5fc5f8b856c5329b2c6007649285a28749b6aa..35913a7de8348d50ac84e0c5ff4f0e741a57ccbf 100644 (file)
@@ -1391,12 +1391,10 @@ static int wave5_vpu_enc_start_streaming(struct vb2_queue *q, unsigned int count
        if (ret)
                goto return_buffers;
 
-       pm_runtime_mark_last_busy(inst->dev->dev);
        pm_runtime_put_autosuspend(inst->dev->dev);
        return 0;
 return_buffers:
        wave5_return_bufs(q, VB2_BUF_STATE_QUEUED);
-       pm_runtime_mark_last_busy(inst->dev->dev);
        pm_runtime_put_autosuspend(inst->dev->dev);
        return ret;
 }
@@ -1465,7 +1463,6 @@ static void wave5_vpu_enc_stop_streaming(struct vb2_queue *q)
        else
                streamoff_capture(inst, q);
 
-       pm_runtime_mark_last_busy(inst->dev->dev);
        pm_runtime_put_autosuspend(inst->dev->dev);
 }
 
@@ -1520,7 +1517,6 @@ static void wave5_vpu_enc_device_run(void *priv)
                        break;
                }
                dev_dbg(inst->dev->dev, "%s: leave with active job", __func__);
-               pm_runtime_mark_last_busy(inst->dev->dev);
                pm_runtime_put_autosuspend(inst->dev->dev);
                return;
        default:
@@ -1529,7 +1525,6 @@ static void wave5_vpu_enc_device_run(void *priv)
                break;
        }
        dev_dbg(inst->dev->dev, "%s: leave and finish job", __func__);
-       pm_runtime_mark_last_busy(inst->dev->dev);
        pm_runtime_put_autosuspend(inst->dev->dev);
        v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
 }
index 0e56a4331b0d70717ca8fd40be0242c74b3210fc..45f8f69048679fba515a3ad0ba8b8142a5e62d16 100644 (file)
@@ -585,7 +585,6 @@ static int tegra_vde_decode_begin(struct tegra_vde *vde,
        return 0;
 
 put_runtime_pm:
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
 unlock:
@@ -612,7 +611,6 @@ static void tegra_vde_decode_abort(struct tegra_vde *vde)
        if (err)
                dev_err(dev, "DEC end: Failed to assert HW reset: %d\n", err);
 
-       pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 
        mutex_unlock(&vde->lock);
index 221dcd09e1e1095074457e7eae2ae547fb3d5376..b3ed06297953b902d5ea6c452385a88d5431ac66 100644 (file)
@@ -142,7 +142,6 @@ int iris_hfi_queue_cmd_write(struct iris_core *core, void *pkt, u32 pkt_size)
        }
        mutex_unlock(&core->lock);
 
-       pm_runtime_mark_last_busy(core->dev);
        pm_runtime_put_autosuspend(core->dev);
 
        return 0;
index b30891718d8df9c48ce1b83ad9fcafb201105625..d60d92d2ffa1c84868284e306d635ef8478d5014 100644 (file)
@@ -950,7 +950,6 @@ static void pispbe_node_stop_streaming(struct vb2_queue *q)
                kfree(job);
        }
 
-       pm_runtime_mark_last_busy(pispbe->dev);
        pm_runtime_put_autosuspend(pispbe->dev);
 
        dev_dbg(pispbe->dev, "Nodes streaming now 0x%x\n",
@@ -1742,7 +1741,6 @@ static int pispbe_probe(struct platform_device *pdev)
        if (ret)
                goto disable_devs_err;
 
-       pm_runtime_mark_last_busy(pispbe->dev);
        pm_runtime_put_autosuspend(pispbe->dev);
 
        return 0;
index 8542238e0fb1d21576f87b8ebb37585a0144c949..fa972effd4a2cbdc0073d36fe6934bd812bcfa14 100644 (file)
@@ -89,7 +89,6 @@ static void hantro_job_finish(struct hantro_dev *vpu,
                              struct hantro_ctx *ctx,
                              enum vb2_buffer_state result)
 {
-       pm_runtime_mark_last_busy(vpu->dev);
        pm_runtime_put_autosuspend(vpu->dev);
 
        clk_bulk_disable(vpu->variant->num_clocks, vpu->clocks);
index bf6d8fa983bfb41e93a678fd20af3224828ac1e7..a6418ef782bc2a4aacf959b55fd126e4fca44627 100644 (file)
@@ -48,10 +48,8 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
        if (val >= 0)
                ir_raw_event_store_edge(gpio_dev->rcdev, val == 1);
 
-       if (pmdev) {
-               pm_runtime_mark_last_busy(pmdev);
+       if (pmdev)
                pm_runtime_put_autosuspend(pmdev);
-       }
 
        return IRQ_HANDLED;
 }