counter: fix devm_platform_ioremap_resource.cocci warnings
Subsystems (3)
PATCH 1/1 counter: fix devm_platform_ioremap_resource.cocci warnings
From: kbuild test robot <[email protected]>
Use devm_platform_ioremap_resource helper which wraps platform_get_resource() and devm_ioremap_resource() together.
Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci
---
tree: https://github.com/dlech/linux bone-counter head: 669cef0feba0b11f271f462c4d26e4d1449a9db8 commit: 78958c294246fe1177ff62518eef45d20ad0165e [5/8] counter: new TI eQEP driver
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
Despite the fixes tag, this is not actually fixing a bug, it just makes the code a little shorter.
ti-eqep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/counter/ti-eqep.c +1 -3
@@ -392,15 +392,13 @@ static int ti_eqep_probe(struct platform {struct device *dev = &pdev->dev;struct ti_eqep_cnt *priv; -struct resource *res;void __iomem *base; priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL );if (!priv)return -ENOMEM ; - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - base =devm_ioremap_resource (dev, res); + base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (base))return PTR_ERR (base);
David Lechner
reviewerQuoted 5 lines · Julia Lawall
From: kbuild test robot <[email protected]>
Use
devm_platform_ioremap_resourcehelper which wrapsplatform_get_resource()anddevm_ioremap_resource()together.
Quoted 7 lines
Generated by:
scripts/coccinelle/api/devm_platform_ioremap_resource.cocciFixes 78958c294246 ("counter: new TI eQEP driver")Signed-off-by kbuild test robot <[email protected]>Signed-off-by Julia Lawall <[email protected]>---
Included this change in v2 of the "counter: new TI eQEP driver" series.
Thanks.