Skip to contentSkip to conversation

hwrng: stm32 - use devm_platform_ioremap_resource() in stm32_rng_probe()

PATCH In review Thorsten Blum 2 participants 2 messages Oct 2 – Oct 8

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwrng: stm32 - use devm_platform_ioremap_resource() in stm32_rng_probe()

The resource pointer is unused - use devm_platform_ioremap_resource() and remove the unnecessary local variable.

---
 drivers/char/hw_random/stm32-rng.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/char/hw_random/stm32-rng.c +1 -2
index f5bfe54c01dc..8468a4a24d48 100644
@@ -528,14 +528,13 @@ static int stm32_rng_probe(struct platform_device *ofdev)
 	struct device *dev = &ofdev->dev;
 	struct device_node *np = ofdev->dev.of_node;
 	struct stm32_rng_private *priv;
-	struct resource *res;
 	int ret;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
 
-	priv->base = devm_platform_get_and_ioremap_resource(ofdev, 0, &res);
+	priv->base = devm_platform_ioremap_resource(ofdev, 0);
 	if (IS_ERR(priv->base))
 		return PTR_ERR(priv->base);
 
maintainer
#1 lore raw
Quoted 7 lines · Thorsten Blum

The resource pointer is unused - use devm_platform_ioremap_resource() and remove the unnecessary local variable.

---
 drivers/char/hw_random/stm32-rng.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt