diff options
author | Markus Elfring <[email protected]> | 2019-09-19 16:51:38 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <[email protected]> | 2020-01-03 14:27:50 +0100 |
commit | 7610bca71ea85d6a641533a20302d80d3e63cfac (patch) | |
tree | 43ff84ac50fb4a4b4e141f9121e6c9182cefc464 | |
parent | bc2e7382890b36c8139d728509c1420073aef5a3 (diff) |
video: pxafb: Use devm_platform_ioremap_resource() in pxafb_probe()
Simplify this function implementation by using a known wrapper function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <[email protected]>
Cc: Daniel Mack <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: YueHaibing <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Himanshu Jha <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/video/fbdev/pxafb.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index 6f7e9fb63190..00b96a78676e 100644 --- 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 = NULL; } - r = platform_get_resource(dev, IORESOURCE_MEM, 0); - if (r == NULL) { - dev_err(&dev->dev, "no I/O memory resource defined\n"); - ret = -ENODEV; - goto failed; - } - - fbi->mmio_base = devm_ioremap_resource(&dev->dev, r); + fbi->mmio_base = devm_platform_ioremap_resource(dev, 0); if (IS_ERR(fbi->mmio_base)) { dev_err(&dev->dev, "failed to get I/O memory\n"); ret = -EBUSY; |