hwrng: stm32 - use devm_platform_ioremap_resource() in stm32_rng_probe()
Subsystems (3)
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.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/char/hw_random/stm32-rng.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/char/hw_random/stm32-rng.c +1 -2
@@ -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);
Herbert Xu
maintainerQuoted 7 lines · Thorsten Blum
The resource pointer is unused - use
devm_platform_ioremap_resource()and remove the unnecessary local variable.Signed-off-by Thorsten Blum <[email protected]>--- 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