]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hwrng: drivers - Remove redundant pm_runtime_mark_last_busy() calls
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 4 Jul 2025 07:53:59 +0000 (10:53 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 18 Jul 2025 10:51:59 +0000 (20:51 +1000)
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: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/atmel-rng.c
drivers/char/hw_random/cctrng.c
drivers/char/hw_random/mtk-rng.c
drivers/char/hw_random/npcm-rng.c
drivers/char/hw_random/omap3-rom-rng.c
drivers/char/hw_random/rockchip-rng.c
drivers/char/hw_random/stm32-rng.c

index d2b00458761e1b927ef3553368b18e38b9202ff3..6ed24be3481dfd2f40a1b08ca9cd7e88b1c740f5 100644 (file)
@@ -80,7 +80,6 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
        ret = 4;
 
 out:
-       pm_runtime_mark_last_busy(trng->dev);
        pm_runtime_put_sync_autosuspend(trng->dev);
        return ret;
 }
index 4db198849695d26543dc593dfc40c8815aceb168..a5be9258037f8b4de5b24b12b99f753ad1741518 100644 (file)
@@ -98,7 +98,6 @@ static void cc_trng_pm_put_suspend(struct device *dev)
 {
        int rc = 0;
 
-       pm_runtime_mark_last_busy(dev);
        rc = pm_runtime_put_autosuspend(dev);
        if (rc)
                dev_err(dev, "pm_runtime_put_autosuspend returned %x\n", rc);
index d09a4d81376669c96a5362aed77d589670347b6a..5808d09d12c45f933d1ccd294a58cbfdf6a28b15 100644 (file)
@@ -98,7 +98,6 @@ static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
                max -= sizeof(u32);
        }
 
-       pm_runtime_mark_last_busy(priv->dev);
        pm_runtime_put_sync_autosuspend(priv->dev);
 
        return retval || !wait ? retval : -EIO;
index 3e308c890bd25a887864f830a2457afc009bab6b..40d6e29dea032d04589c27046f707e1a3f90b2f6 100644 (file)
@@ -80,7 +80,6 @@ static int npcm_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
                max--;
        }
 
-       pm_runtime_mark_last_busy(priv->dev);
        pm_runtime_put_sync_autosuspend(priv->dev);
 
        return retval || !wait ? retval : -EIO;
index 8064c792caf0a2dc6c5b2e6e1e65220ce7f5427d..aa71f61c3dc9e4cf849167d9bc68d6e8e77e0425 100644 (file)
@@ -56,7 +56,6 @@ static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
        else
                r = 4;
 
-       pm_runtime_mark_last_busy(ddata->dev);
        pm_runtime_put_autosuspend(ddata->dev);
 
        return r;
index fb4a30b955075889191d960cf03364af7f5b7069..6e3ed4b8560514005ae3953fdbd0228707a9d7e5 100644 (file)
@@ -223,7 +223,6 @@ static int rk3568_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
        /* Read random data stored in the registers */
        memcpy_fromio(buf, rk_rng->base + TRNG_RNG_DOUT, to_read);
 out:
-       pm_runtime_mark_last_busy(rk_rng->dev);
        pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
        return (ret < 0) ? ret : to_read;
@@ -263,7 +262,6 @@ static int rk3576_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
        memcpy_fromio(buf, rk_rng->base + RKRNG_TRNG_DATA0, to_read);
 
 out:
-       pm_runtime_mark_last_busy(rk_rng->dev);
        pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
        return (ret < 0) ? ret : to_read;
@@ -355,7 +353,6 @@ out:
        /* close the TRNG */
        rk_rng_writel(rk_rng, TRNG_V1_CTRL_NOP, TRNG_V1_CTRL);
 
-       pm_runtime_mark_last_busy(rk_rng->dev);
        pm_runtime_put_sync_autosuspend(rk_rng->dev);
 
        return (ret < 0) ? ret : to_read;
index 98edbe796bc52314833e522f4e49843c5e58b12d..9a8c00586ab0964b5375436c7250f1ee69748a53 100644 (file)
@@ -255,7 +255,6 @@ static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
        }
 
 exit_rpm:
-       pm_runtime_mark_last_busy(priv->dev);
        pm_runtime_put_sync_autosuspend(priv->dev);
 
        return retval || !wait ? retval : -EIO;