From: Markus Elfring Subject: [PATCH] video: pxafb: Use devm_platform_ioremap_resource() in pxafb_probe() Date: Thu, 19 Sep 2019 17:01:06 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz , Daniel Mack , Mauro Carvalho Chehab , "Rafael J. Wysocki" , Viresh Kumar , YueHaibing Cc: LKML , kernel-janitors@vger.kernel.org, Bartosz Golaszewski , Himanshu Jha List-Id: dri-devel@lists.freedesktop.org From: Markus Elfring Date: Thu, 19 Sep 2019 16:51:38 +0200 Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring =2D-- drivers/video/fbdev/pxafb.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index f70c9f79622e..237f8f436fdb 100644 =2D-- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -2237,7 +2237,6 @@ static int pxafb_probe(struct platform_device *dev) { struct pxafb_info *fbi; struct pxafb_mach_info *inf, *pdata; - struct resource *r; int i, irq, ret; dev_dbg(&dev->dev, "pxafb_probe\n"); @@ -2303,14 +2302,7 @@ static int pxafb_probe(struct platform_device *dev) fbi->lcd_supply =3D NULL; } - r =3D platform_get_resource(dev, IORESOURCE_MEM, 0); - if (r =3D=3D NULL) { - dev_err(&dev->dev, "no I/O memory resource defined\n"); - ret =3D -ENODEV; - goto failed; - } - - fbi->mmio_base =3D devm_ioremap_resource(&dev->dev, r); + fbi->mmio_base =3D devm_platform_ioremap_resource(dev, 0); if (IS_ERR(fbi->mmio_base)) { dev_err(&dev->dev, "failed to get I/O memory\n"); ret =3D -EBUSY; =2D- 2.23.0