[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZoiMvTzXMFxkfcJF@gondor.apana.org.au>
Date: Sat, 6 Jul 2024 10:15:57 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Daniel Golle <daniel@...rotopia.org>
Cc: Aurelien Jarno <aurelien@...el32.net>,
Olivia Mackall <olivia@...enic.com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Heiko Stuebner <heiko@...ech.de>,
Philipp Zabel <p.zabel@...gutronix.de>,
Uwe Kleine-König <ukleinek@...ian.org>,
Dragan Simic <dsimic@...jaro.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Martin Kaiser <martin@...ser.cx>, Tony Luck <tony.luck@...el.com>,
Ard Biesheuvel <ardb@...nel.org>, linux-crypto@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/3] hwrng: add hwrng driver for Rockchip RK3568 SoC
On Wed, Jun 26, 2024 at 02:37:10AM +0100, Daniel Golle wrote:
>
> +#ifndef CONFIG_PM
> + rk_rng->rng.init = rk_rng_init;
> + rk_rng->rng.cleanup = rk_rng_cleanup;
> +#endif
Please rewrite this as
if (!IS_ENABLED(CONFIG_PM)) {
...
}
> +#ifdef CONFIG_PM
> +static int rk_rng_runtime_suspend(struct device *dev)
> +{
> + struct rk_rng *rk_rng = dev_get_drvdata(dev);
> +
> + rk_rng_cleanup(&rk_rng->rng);
> +
> + return 0;
> +}
> +
> +static int rk_rng_runtime_resume(struct device *dev)
> +{
> + struct rk_rng *rk_rng = dev_get_drvdata(dev);
> +
> + return rk_rng_init(&rk_rng->rng);
> +}
> +#endif
These ifdefs should just disappear, with __maybe_unused added
instead.
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists