drm/tidss: use devm_platform_ioremap_resource_byname
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- drivers/gpu/drm/tidss/tidss_dispc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/gpu/drm/tidss/tidss_dispc.c +1 -8
@@ -2605,16 +2605,9 @@ void dispc_remove(struct tidss_device *tidss)static int dispc_iomap_resource (struct platform_device *pdev,const char *name,void __iomem **base) { -struct resource *res;void __iomem *b; - res =platform_get_resource_byname (pdev,IORESOURCE_MEM , name); -if (!res) { -dev_err (&pdev->dev,"cannot get mem resource '%s'\n" , name); -return -EINVAL ; - } - - b =devm_ioremap_resource (&pdev->dev, res); + b =devm_platform_ioremap_resource_byname (pdev, name);if (IS_ERR (b)) {dev_err (&pdev->dev,"cannot ioremap resource '%s'\n" , name);return PTR_ERR (b);
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 22 lines · Wang Xiaojun
Use the
devm_platform_ioremap_resource_byname()helper instead of callingplatform_get_resource_byname()anddevm_ioremap_resource()separately.Signed-off-by Wang Xiaojun <[email protected]>--- drivers/gpu/drm/tidss/tidss_dispc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)drivers/gpu/drm/tidss/tidss_dispc.c +0
-2@@ -2605,16 +2605,9 @@ void dispc_remove(struct tidss_device *tidss)static int dispc_iomap_resource (struct platform_device *pdev,const char *name,void __iomem **base) { -struct resource *res;void __iomem *b; - res =platform_get_resource_byname (pdev,IORESOURCE_MEM , name);
drivers/gpu/drm/tidss/tidss_dispc.c void dispc_remove(struct tidss_device *tidss) · line 2613
Quoted 10 lines
drivers/gpu/drm/tidss/tidss_dispc.c +1
-6-if (!res) { -dev_err (&pdev->dev,"cannot get mem resource '%s'\n" , name); -return -EINVAL ; - } - - b =devm_ioremap_resource (&pdev->dev, res); + b =devm_platform_ioremap_resource_byname (pdev, name);if (IS_ERR (b)) {dev_err (&pdev->dev,"cannot ioremap resource '%s'\n" , name);return PTR_ERR (b);
Thanks, I have picked this up to drm-misc-next.
Tomi
Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel