mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
hwrng: omap3-rom - Use pm_runtime_resume_and_get()
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 <phucduc.bui@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
627934a5d2
commit
edf73c9922
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user