From 071560202a52fe7647c677d52792f4c690f126dc Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Mon, 29 Jun 2020 18:04:02 +1000 Subject: [PATCH] hwrng: st - Fix W=1 unused variable warning [ Upstream commit ad23756271d5744a0a0ba556f8aaa70e358d5aa6 ] This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu Stable-dep-of: 501e197a02d4 ("hwrng: st - keep clock enabled while hwrng is registered") Signed-off-by: Sasha Levin --- drivers/char/hw_random/st-rng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c index 863448360a7d..50975e761ca5 100644 --- a/drivers/char/hw_random/st-rng.c +++ b/drivers/char/hw_random/st-rng.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -123,7 +124,7 @@ static int st_rng_remove(struct platform_device *pdev) return 0; } -static const struct of_device_id st_rng_match[] = { +static const struct of_device_id st_rng_match[] __maybe_unused = { { .compatible = "st,rng" }, {}, };