Message ID | E1jpolm-0003w9-IT@fornost.hmeau.com |
---|---|
State | Accepted |
Commit | ad23756271d5744a0a0ba556f8aaa70e358d5aa6 |
Headers | show |
Series | [1/7] hwrng: npcm - Fix W=1 unused variable warning | expand |
diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c index 783c24e3f8b7f..15ba1e6fae4d2 100644 --- a/drivers/char/hw_random/st-rng.c +++ b/drivers/char/hw_random/st-rng.c @@ -12,6 +12,7 @@ #include <linux/delay.h> #include <linux/hw_random.h> #include <linux/io.h> +#include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> #include <linux/platform_device.h> @@ -121,7 +122,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" }, {}, };
This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> --- drivers/char/hw_random/st-rng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)