Skip to content

Commit e8897e4

Browse files
TinyWindzzojeda
authored andcommitted
auxdisplay: img-ascii-lcd: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>
1 parent d568bbd commit e8897e4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/auxdisplay/img-ascii-lcd.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ static int img_ascii_lcd_probe(struct platform_device *pdev)
356356
const struct of_device_id *match;
357357
const struct img_ascii_lcd_config *cfg;
358358
struct img_ascii_lcd_ctx *ctx;
359-
struct resource *res;
360359
int err;
361360

362361
match = of_match_device(img_ascii_lcd_matches, &pdev->dev);
@@ -378,8 +377,7 @@ static int img_ascii_lcd_probe(struct platform_device *pdev)
378377
&ctx->offset))
379378
return -EINVAL;
380379
} else {
381-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
382-
ctx->base = devm_ioremap_resource(&pdev->dev, res);
380+
ctx->base = devm_platform_ioremap_resource(pdev, 0);
383381
if (IS_ERR(ctx->base))
384382
return PTR_ERR(ctx->base);
385383
}

0 commit comments

Comments
 (0)