Skip to content

Commit

Permalink
OMAPDSS: HDMI: Convert to devm_request_and_ioremap
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ricardo Neri authored and Tomi Valkeinen committed Nov 6, 2012
1 parent af23cb3 commit 47e443b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/video/omap2/dss/hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,15 +1064,15 @@ 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;
}

r = hdmi_get_clocks(pdev);
if (r) {
iounmap(hdmi.ip_data.base_wp);
DSSERR("can't get clocks\n");
return r;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 47e443b

Please sign in to comment.