mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
synced 2025-11-05 09:14:42 +10:00
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>
This commit is contained in:
parent
75e2d4b1ed
commit
99d9edf638
@ -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;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user