drm/arm/hdlcd: Make use of the helper function devm_platform_ioremap_resource()
Subsystems (4)
PATCH 1/1 drm/arm/hdlcd: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately
Signed-off-by Cai Huoqing <[email protected]>
--- drivers/gpu/drm/arm/hdlcd_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/arm/hdlcd_drv.c +1 -3
@@ -129,7 +129,6 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags) {struct hdlcd_drm_private *hdlcd = drm->dev_private;struct platform_device *pdev =to_platform_device (drm->dev); -struct resource *res;u32 version;int ret;
@@ -144,8 +143,7 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)atomic_set (&hdlcd->dma_end_count,0 );#endif - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - hdlcd->mmio =devm_ioremap_resource (drm->dev, res); + hdlcd->mmio =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (hdlcd->mmio)) {DRM_ERROR ("failed to map control registers area\n" ); ret =PTR_ERR (hdlcd->mmio);
Signature · 1 line
2.25.1
Quoted 5 lines · Cai Huoqing
Use the
devm_platform_ioremap_resource()helper instead of callingplatform_get_resource()anddevm_ioremap_resource()separatelySigned-off-by Cai Huoqing <[email protected]>
Acked-by Liviu Dudau <[email protected]>
Many thanks,
Liviu
Quoted 29 lines
--- drivers/gpu/drm/arm/hdlcd_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/arm/hdlcd_drv.c +1
-3@@ -129,7 +129,6 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags) {struct hdlcd_drm_private *hdlcd = drm->dev_private;struct platform_device *pdev =to_platform_device (drm->dev); -struct resource *res;u32 version;int ret;@@ -144,8 +143,7 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)atomic_set (&hdlcd->dma_end_count,0 );#endif - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - hdlcd->mmio =devm_ioremap_resource (drm->dev, res); + hdlcd->mmio =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (hdlcd->mmio)) {DRM_ERROR ("failed to map control registers area\n" ); ret =PTR_ERR (hdlcd->mmio);Signature · 1 line
2.25.1
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯