diff options
author | Ricardo Neri <ricardo.neri@ti.com> | 2012-11-06 00:19:12 -0600 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-11-06 13:33:35 +0200 |
commit | 47e443bce78472ecee8d4246ac726f0a9c19cbd1 (patch) | |
tree | 48539dcbf72522eec32d99a48964ac7cac17dd27 /drivers/video/omap2/dss/hdmi.c | |
parent | af23cb353307c9d69a5d41ce6168c83fe032387d (diff) | |
download | linux-stable-47e443bce78472ecee8d4246ac726f0a9c19cbd1.tar.gz linux-stable-47e443bce78472ecee8d4246ac726f0a9c19cbd1.tar.bz2 linux-stable-47e443bce78472ecee8d4246ac726f0a9c19cbd1.zip |
OMAPDSS: HDMI: Convert to devm_request_and_ioremap
Using devm_request_and_ioremap provides better memory handling and
improves readability.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/hdmi.c')
-rw-r--r-- | 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 72ab260cfb27..1d04bc0479e7 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c @@ -1064,7 +1064,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; @@ -1072,7 +1072,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; } @@ -1117,8 +1117,6 @@ static int __exit omapdss_hdmihw_remove(struct platform_device *pdev) hdmi_put_clocks(); - iounmap(hdmi.ip_data.base_wp); - return 0; } |