From: Herbert Xu Date: Mon, 29 Jun 2020 08:04:00 +0000 (+1000) Subject: hwrng: bcm2835 - Fix W=1 unused variable warning X-Git-Tag: v5.15~3097^2~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64f8153a2f36d2eb82fc6e4d7eee3b08ef10371c;p=platform%2Fkernel%2Flinux-starfive.git hwrng: bcm2835 - Fix W=1 unused variable warning This patch fixes an unused variable warning when this driver is built with CONFIG_OF=n. Signed-off-by: Herbert Xu --- diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c index cbf5eae..eec2632 100644 --- a/drivers/char/hw_random/bcm2835-rng.c +++ b/drivers/char/hw_random/bcm2835-rng.c @@ -139,7 +139,6 @@ static int bcm2835_rng_probe(struct platform_device *pdev) { const struct bcm2835_rng_of_data *of_data; struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; const struct of_device_id *rng_id; struct bcm2835_rng_priv *priv; int err; @@ -166,7 +165,7 @@ static int bcm2835_rng_probe(struct platform_device *pdev) priv->rng.cleanup = bcm2835_rng_cleanup; if (dev_of_node(dev)) { - rng_id = of_match_node(bcm2835_rng_of_match, np); + rng_id = of_match_node(bcm2835_rng_of_match, dev->of_node); if (!rng_id) return -EINVAL;