summaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2020-06-29 10:04:02 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2020-07-09 10:25:12 +0200
commitad23756271d5744a0a0ba556f8aaa70e358d5aa6 (patch)
treea9da799e06f1bad7425db27dc71e33d2d8f622bb /drivers/char/hw_random
parenthwrng: bcm2835 - Fix W=1 unused variable warning (diff)
downloadlinux-ad23756271d5744a0a0ba556f8aaa70e358d5aa6.tar.xz
linux-ad23756271d5744a0a0ba556f8aaa70e358d5aa6.zip
hwrng: st - Fix W=1 unused variable warning
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>
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r--drivers/char/hw_random/st-rng.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c
index 783c24e3f8b7..15ba1e6fae4d 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" },
{},
};