mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 09:34:12 +08:00
fbdev: s3c-fb: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Jingoo Han <jingoohan1@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190904115523.25068-1-yuehaibing@huawei.com
This commit is contained in:
parent
1d47d0bb72
commit
8d5598f13f
@ -1411,8 +1411,7 @@ static int s3c_fb_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
pm_runtime_enable(sfb->dev);
|
pm_runtime_enable(sfb->dev);
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
sfb->regs = devm_platform_ioremap_resource(pdev, 0);
|
||||||
sfb->regs = devm_ioremap_resource(dev, res);
|
|
||||||
if (IS_ERR(sfb->regs)) {
|
if (IS_ERR(sfb->regs)) {
|
||||||
ret = PTR_ERR(sfb->regs);
|
ret = PTR_ERR(sfb->regs);
|
||||||
goto err_lcd_clk;
|
goto err_lcd_clk;
|
||||||
|
Loading…
Reference in New Issue
Block a user