On 02. 04. 19 21:01, Guenter Roeck wrote: > Use devm_platform_ioremap_resource to reduce source code size, > improve readability, and reduce the likelyhood of bugs. > > The conversion was done automatically with coccinelle using the > following semantic patch. > > @r@ > identifier res, pdev; > expression a; > expression index; > expression e; > @@ > > <+... > - res = platform_get_resource(pdev, IORESOURCE_MEM, index); > - a = devm_ioremap_resource(e, res); > + a = devm_platform_ioremap_resource(pdev, index); > ...+> > > @depends on r@ > identifier r.res; > @@ > - struct resource *res; > ... when != res > > @@ > identifier res, pdev; > expression index; > expression a; > @@ > - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, index); > - a = devm_ioremap_resource(&pdev->dev, res); > + a = devm_platform_ioremap_resource(pdev, index); > > Cc: Joel Stanley <j...@jms.id.au> > Cc: Nicolas Ferre <nicolas.fe...@microchip.com> > Cc: Alexandre Belloni <alexandre.bell...@bootlin.com> > Cc: Florian Fainelli <f.faine...@gmail.com> > Cc: Linus Walleij <linus.wall...@linaro.org> > Cc: Baruch Siach <bar...@tkos.co.il> > Cc: Keguang Zhang <keguang.zh...@gmail.com> > Cc: Vladimir Zapolskiy <v...@mleia.com> > Cc: Kevin Hilman <khil...@baylibre.com> > Cc: Matthias Brugger <matthias....@gmail.com> > Cc: Avi Fishman <avifishma...@gmail.com> > Cc: Nancy Yuen <yu...@google.com> > Cc: Brendan Higgins <brendanhigg...@google.com> > Cc: Wan ZongShun <mcuos....@gmail.com> > Cc: Michal Simek <michal.si...@xilinx.com> > Cc: Sylvain Lemieux <slemieux.t...@gmail.com> > Cc: Kukjin Kim <kg...@kernel.org> > Cc: Barry Song <bao...@kernel.org> > Cc: Orson Zhai <orsonz...@gmail.com> > Cc: Patrice Chotard <patrice.chot...@st.com> > Cc: Maxime Coquelin <mcoquelin.st...@gmail.com> > Cc: Maxime Ripard <maxime.rip...@bootlin.com> > Cc: Chen-Yu Tsai <w...@csie.org> > Cc: Marc Gonzalez <marc.w.gonza...@free.fr> > Cc: Thierry Reding <thierry.red...@gmail.com> > Cc: Shawn Guo <shawn...@kernel.org> > Signed-off-by: Guenter Roeck <li...@roeck-us.net> > --- > drivers/watchdog/asm9260_wdt.c | 4 +--- > drivers/watchdog/aspeed_wdt.c | 4 +--- > drivers/watchdog/at91sam9_wdt.c | 4 +--- > drivers/watchdog/ath79_wdt.c | 4 +--- > drivers/watchdog/atlas7_wdt.c | 4 +--- > drivers/watchdog/bcm7038_wdt.c | 4 +--- > drivers/watchdog/bcm_kona_wdt.c | 4 +--- > drivers/watchdog/cadence_wdt.c | 4 +--- ... > drivers/watchdog/of_xilinx_wdt.c | 4 +---
Acked-by: Michal Simek <michal.si...@xilinx.com> (cadence/xilinx wdts) Thanks, Michal