Message ID | alpine.DEB.2.21.1908091139270.2946@hadrien (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | counter: fix devm_platform_ioremap_resource.cocci warnings | expand |
On 8/9/19 4:41 AM, Julia Lawall wrote: > From: kbuild test robot <lkp@intel.com> > > 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 > > Fixes: 78958c294246 ("counter: new TI eQEP driver") > Signed-off-by: kbuild test robot <lkp@intel.com> > Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> > --- > Included this change in v2 of the "counter: new TI eQEP driver" series. Thanks.
--- a/drivers/counter/ti-eqep.c +++ b/drivers/counter/ti-eqep.c @@ -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);