hwrng: omap3-rom: Use pm_runtime_resume_and_get()
Subsystems (2)
PATCH 1/1 hwrng: omap3-rom: Use pm_runtime_resume_and_get()
From: bui duc phuc <[email protected]>
Replace the open-coded pm_runtime_get_sync() + pm_runtime_put_noidle() error handling pattern with pm_runtime_resume_and_get(), which already does this internally.
No functional change.
Found by manual code inspection.
Signed-off-by bui duc phuc <[email protected]>
--- drivers/char/hw_random/omap3-rom-rng.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/char/hw_random/omap3-rom-rng.c +2 -5
@@ -42,12 +42,9 @@ static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w) ddata = (struct omap_rom_rng *)rng->priv; - r =pm_runtime_get_sync (ddata->dev); -if (r <0 ) { -pm_runtime_put_noidle (ddata->dev); - + r =pm_runtime_resume_and_get (ddata->dev); +if (r <0 )return r; - } ptr =virt_to_phys (data); r = ddata->rom_rng_call (ptr,4 ,RNG_GEN_HW );
Signature · 1 line
2.43.0
Herbert Xu
maintainerQuoted 6 lines · On Tue, Sep 22, 2026 at 10:20:54AM +0700, [email protected] wrote:
From: bui duc phuc <[email protected]>
Replace the open-coded
pm_runtime_get_sync()+pm_runtime_put_noidle()error handling pattern withpm_runtime_resume_and_get(), which already does this internally.
Quoted 8 lines
No functional change.
Found by manual code inspection.
Signed-off-by bui duc phuc <[email protected]>--- drivers/char/hw_random/omap3-rom-rng.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt