hwrng: imx-rngc - simplify the power management definitions
authorMartin Kaiser <martin@kaiser.cx>
Thu, 11 Jan 2018 21:06:39 +0000 (22:06 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 18 Jan 2018 11:52:30 +0000 (22:52 +1100)
commitcd0bb67f21dadaf0a0240776f6e39a14b4f7625b
treec659afe60ba3e17e5672918963a031a1b9e40c5b
parente1a018e607a33dc9f987c761daf1792082fb9ca7
hwrng: imx-rngc - simplify the power management definitions

Use the SIMPLE_DEV_PM_OPS() macro instead of populating a struct
dev_pm_ops directly. The suspend and resume functions will now be used
for both hibernation and suspend to ram.

If power management is disabled, SIMPLE_DEV_PM_OPS() evaluates to
nothing, The two functions won't be used and won't be included in the
kernel. Mark them as __maybe_unused to clarify that this is intended
behaviour.

With these modifications in place, we don't need the #ifdefs for power
management any more.

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