summaryrefslogtreecommitdiff
path: root/drivers/char/hw_random
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2020-06-29 11:04:02 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-07-09 11:25:12 +0300
commitad23756271d5744a0a0ba556f8aaa70e358d5aa6 (patch)
treea9da799e06f1bad7425db27dc71e33d2d8f622bb /drivers/char/hw_random
parent64f8153a2f36d2eb82fc6e4d7eee3b08ef10371c (diff)
downloadlinux-ad23756271d5744a0a0ba556f8aaa70e358d5aa6.tar.xz
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" },
{},
};