Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/tidss: use devm_platform_ioremap_resource_byname

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.

Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200917062958.2183496-1-wangxiaojun11@huawei.com

authored by

Wang Xiaojun and committed by
Tomi Valkeinen
3945ac0e ae36fccc

+1 -8
+1 -8
drivers/gpu/drm/tidss/tidss_dispc.c
··· 2608 2608 static int dispc_iomap_resource(struct platform_device *pdev, const char *name, 2609 2609 void __iomem **base) 2610 2610 { 2611 - struct resource *res; 2612 2611 void __iomem *b; 2613 2612 2614 - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name); 2615 - if (!res) { 2616 - dev_err(&pdev->dev, "cannot get mem resource '%s'\n", name); 2617 - return -EINVAL; 2618 - } 2619 - 2620 - b = devm_ioremap_resource(&pdev->dev, res); 2613 + b = devm_platform_ioremap_resource_byname(pdev, name); 2621 2614 if (IS_ERR(b)) { 2622 2615 dev_err(&pdev->dev, "cannot ioremap resource '%s'\n", name); 2623 2616 return PTR_ERR(b);