Skip to content

Commit 99d9edf

Browse files
Sakari Ailusherbertx
authored andcommitted
hwrng: drivers - Remove redundant pm_runtime_mark_last_busy() calls
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>
1 parent 75e2d4b commit 99d9edf

7 files changed

Lines changed: 0 additions & 9 deletions

File tree

drivers/char/hw_random/atmel-rng.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
8080
ret = 4;
8181

8282
out:
83-
pm_runtime_mark_last_busy(trng->dev);
8483
pm_runtime_put_sync_autosuspend(trng->dev);
8584
return ret;
8685
}

drivers/char/hw_random/cctrng.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ static void cc_trng_pm_put_suspend(struct device *dev)
9898
{
9999
int rc = 0;
100100

101-
pm_runtime_mark_last_busy(dev);
102101
rc = pm_runtime_put_autosuspend(dev);
103102
if (rc)
104103
dev_err(dev, "pm_runtime_put_autosuspend returned %x\n", rc);

drivers/char/hw_random/mtk-rng.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
9898
max -= sizeof(u32);
9999
}
100100

101-
pm_runtime_mark_last_busy(priv->dev);
102101
pm_runtime_put_sync_autosuspend(priv->dev);
103102

104103
return retval || !wait ? retval : -EIO;

drivers/char/hw_random/npcm-rng.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ static int npcm_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
8080
max--;
8181
}
8282

83-
pm_runtime_mark_last_busy(priv->dev);
8483
pm_runtime_put_sync_autosuspend(priv->dev);
8584

8685
return retval || !wait ? retval : -EIO;

drivers/char/hw_random/omap3-rom-rng.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
5656
else
5757
r = 4;
5858

59-
pm_runtime_mark_last_busy(ddata->dev);
6059
pm_runtime_put_autosuspend(ddata->dev);
6160

6261
return r;

drivers/char/hw_random/rockchip-rng.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ static int rk3568_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
223223
/* Read random data stored in the registers */
224224
memcpy_fromio(buf, rk_rng->base + TRNG_RNG_DOUT, to_read);
225225
out:
226-
pm_runtime_mark_last_busy(rk_rng->dev);
227226
pm_runtime_put_sync_autosuspend(rk_rng->dev);
228227

229228
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)
263262
memcpy_fromio(buf, rk_rng->base + RKRNG_TRNG_DATA0, to_read);
264263

265264
out:
266-
pm_runtime_mark_last_busy(rk_rng->dev);
267265
pm_runtime_put_sync_autosuspend(rk_rng->dev);
268266

269267
return (ret < 0) ? ret : to_read;
@@ -355,7 +353,6 @@ static int rk3588_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
355353
/* close the TRNG */
356354
rk_rng_writel(rk_rng, TRNG_V1_CTRL_NOP, TRNG_V1_CTRL);
357355

358-
pm_runtime_mark_last_busy(rk_rng->dev);
359356
pm_runtime_put_sync_autosuspend(rk_rng->dev);
360357

361358
return (ret < 0) ? ret : to_read;

drivers/char/hw_random/stm32-rng.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
255255
}
256256

257257
exit_rpm:
258-
pm_runtime_mark_last_busy(priv->dev);
259258
pm_runtime_put_sync_autosuspend(priv->dev);
260259

261260
return retval || !wait ? retval : -EIO;

0 commit comments

Comments
 (0)