All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Neri <ricardo.neri@ti.com>
To: tomi.valkeinen@ti.com
Cc: peter.ujfalusi@ti.com, s-guiriec@ti.com, b-cousson@ti.com,
	linux-omap@vger.kernel.org, Ricardo Neri <ricardo.neri@ti.com>
Subject: [PATCH v2 2/7] OMAPDSS: HDMI: Convert to devm_request_and_ioremap
Date: Fri, 2 Nov 2012 18:31:43 -0600	[thread overview]
Message-ID: <1351902708-866-3-git-send-email-ricardo.neri@ti.com> (raw)
In-Reply-To: <1351902708-866-1-git-send-email-ricardo.neri@ti.com>

Using devm_request_and_ioremap provides better memory handling and
improves readability.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
---
 drivers/video/omap2/dss/hdmi.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index cdb043d..51ee0a6 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1012,7 +1012,7 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
 	}
 
 	/* Base address taken from platform */
-	hdmi.ip_data.base_wp = ioremap(res->start, resource_size(res));
+	hdmi.ip_data.base_wp = devm_request_and_ioremap(&pdev->dev, res);
 	if (!hdmi.ip_data.base_wp) {
 		DSSERR("can't ioremap WP\n");
 		return -ENOMEM;
@@ -1020,7 +1020,7 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
 
 	r = hdmi_get_clocks(pdev);
 	if (r) {
-		iounmap(hdmi.ip_data.base_wp);
+		DSSERR("can't get clocks\n");
 		return r;
 	}
 
@@ -1065,8 +1065,6 @@ static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
 
 	hdmi_put_clocks();
 
-	iounmap(hdmi.ip_data.base_wp);
-
 	return 0;
 }
 
-- 
1.7.5.4


  parent reply	other threads:[~2012-11-02 23:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-03  0:31 [PATCH v2 0/7] Create platform device for audio support Ricardo Neri
2012-11-03  0:31 ` [PATCH v2 1/7] OMAPDSS: HDMI: Rename resource variable at probe Ricardo Neri
2012-11-03  0:31 ` Ricardo Neri [this message]
2012-11-03  0:31 ` [PATCH v2 3/7] OMAPDSS: HDMI: Make panel return dssdev register errors Ricardo Neri
2012-11-03  0:31 ` [PATCH v2 4/7] OMAPDSS: HDMI: Handle panel init error at probe Ricardo Neri
2012-11-03  0:31 ` [PATCH v2 5/7] OMAPDSS: HDMI: Uninit display on device add error Ricardo Neri
2012-11-03  0:31 ` [PATCH v2 6/7] OMAPDSS: HDMI: Add op to get audio DMA port address offset Ricardo Neri
2012-11-03  0:31 ` [PATCH v2 7/7] OMAPDSS: HDMI: Create platform device for audio support Ricardo Neri
2012-11-05  8:46   ` Tomi Valkeinen
2012-11-06  5:27     ` Ricardo Neri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1351902708-866-3-git-send-email-ricardo.neri@ti.com \
    --to=ricardo.neri@ti.com \
    --cc=b-cousson@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    --cc=s-guiriec@ti.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.