diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-12-29 07:04:19 +0000 |
---|---|---|
committer | Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | 2020-03-06 22:07:10 +0100 |
commit | e8897e4fe8f27d407b1e00ee0410fd3ec396275c (patch) | |
tree | c93588c6d7d10b7f242018c6e3d44ecf0efa9f74 /drivers/auxdisplay | |
parent | d568bbd2f872cdd1b605d8e6b9b9c719a0ebd306 (diff) | |
download | linux-e8897e4fe8f27d407b1e00ee0410fd3ec396275c.tar.bz2 |
auxdisplay: img-ascii-lcd: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Diffstat (limited to 'drivers/auxdisplay')
-rw-r--r-- | drivers/auxdisplay/img-ascii-lcd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii-lcd.c index efb928e25aef..1cce409ce5ca 100644 --- a/drivers/auxdisplay/img-ascii-lcd.c +++ b/drivers/auxdisplay/img-ascii-lcd.c @@ -356,7 +356,6 @@ static int img_ascii_lcd_probe(struct platform_device *pdev) const struct of_device_id *match; const struct img_ascii_lcd_config *cfg; struct img_ascii_lcd_ctx *ctx; - struct resource *res; int err; match = of_match_device(img_ascii_lcd_matches, &pdev->dev); @@ -378,8 +377,7 @@ static int img_ascii_lcd_probe(struct platform_device *pdev) &ctx->offset)) return -EINVAL; } else { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ctx->base = devm_ioremap_resource(&pdev->dev, res); + ctx->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ctx->base)) return PTR_ERR(ctx->base); } |