hwrng: omap3-rom - Use runtime PM instead of custom functions
authorTony Lindgren <tony@atomide.com>
Sat, 14 Sep 2019 21:02:59 +0000 (14:02 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 4 Oct 2019 15:06:12 +0000 (01:06 +1000)
commit8d9d4bdc495f5e57877f9ec59af323fcbf3485fe
tree938f85c5c67683c4e73e6a1a195e8aac320b6deb
parentb8d665aed401b51297d8f2e9fbf2774e94d278bf
hwrng: omap3-rom - Use runtime PM instead of custom functions

Nowadays we have runtime PM, and we can use it with autosuspend_timeout
to idle things automatically. This allows us to get rid of the custom
PM implementation.

We enable clocks and init RNG in runtime_resume, and reset RNG and
disable clocks in runtime_suspend. And then omap3_rom_rng_read()
becomes very simple and we don't need the old functions for
omap3_rom_rng_idle() and omap3_rom_rng_get_random(). We can now also
get rid of pr_fmt as we're using dev_err instead.

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Adam Ford <aford173@gmail.com>
Cc: Pali Rohár <pali.rohar@gmail.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/omap3-rom-rng.c