diff mbox

[V2] DRM: Armada: Use devm_ioremap_resource()

Message ID 008a01cf52e6$c8ab50e0$5a01f2a0$%han@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jingoo Han April 8, 2014, 4:55 a.m. UTC
Use devm_ioremap_resource() because devm_request_and_ioremap() is
obsoleted by devm_ioremap_resource().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- remove unnecessary error message, because devm_ioremap_resource()
  already prints one in all failure cases.

 drivers/gpu/drm/armada/armada_crtc.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
index 5831e41..0bcce78 100644
--- a/drivers/gpu/drm/armada/armada_crtc.c
+++ b/drivers/gpu/drm/armada/armada_crtc.c
@@ -1038,11 +1038,9 @@  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) {
-		DRM_ERROR("failed to ioremap register\n");
-		return -ENOMEM;
-	}
+	base = devm_ioremap_resource(dev->dev, res);
+	if (IS_ERR(base))
+		return PTR_ERR(base);
 
 	dcrtc = kzalloc(sizeof(*dcrtc), GFP_KERNEL);
 	if (!dcrtc) {