hwrng: virtio - remove #ifdef guards for PM functions
authorMartin Kaiser <martin@kaiser.cx>
Sun, 12 Nov 2023 16:52:41 +0000 (17:52 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Nov 2023 11:16:29 +0000 (19:16 +0800)
commit7c18e3c6b309aebc0fde38bda5ff30ea22c8a56c
treea49a1daa5c598827ed71f8eafe36507d7a3be10e
parentd57343022b71b9f41e731282dbe0baf0cff6ada8
hwrng: virtio - remove #ifdef guards for PM functions

Use pm_sleep_ptr for the freeze and restore functions instead of putting
them under #ifdef CONFIG_PM_SLEEP. The resulting code is slightly simpler.

pm_sleep_ptr lets the compiler see the functions but also allows removing
them as unused code if !CONFIG_PM_SLEEP.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/virtio-rng.c