[PATCH] DRM: Armada: Use devm_ioremap_resource()

Jingoo Han jg1.han at samsung.com
Wed Apr 2 17:31:04 PDT 2014


Use devm_ioremap_resource() because devm_request_and_ioremap() is
obsoleted by devm_ioremap_resource().

Signed-off-by: Jingoo Han <jg1.han at samsung.com>
---
 drivers/gpu/drm/armada/armada_crtc.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
index d8e3982..23b0123 100644
--- a/drivers/gpu/drm/armada/armada_crtc.c
+++ b/drivers/gpu/drm/armada/armada_crtc.c
@@ -1037,10 +1037,10 @@ int armada_drm_crtc_create(struct drm_device *dev, unsigned num,
 	if (ret)
 		return ret;
 
-	base = devm_request_and_ioremap(dev->dev, res);
-	if (!base) {
+	base = devm_ioremap_resource(dev->dev, res);
+	if (IS_ERR(base)) {
 		DRM_ERROR("failed to ioremap register\n");
-		return -ENOMEM;
+		return PTR_ERR(base);
 	}
 
 	dcrtc = kzalloc(sizeof(*dcrtc), GFP_KERNEL);
-- 
1.7.10.4




More information about the dri-devel mailing list