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>
This commit is contained in:
parent
af23cb3533
commit
47e443bce7
1 changed files with 2 additions and 4 deletions
|
@ -1064,7 +1064,7 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Base address taken from platform */
|
/* 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) {
|
if (!hdmi.ip_data.base_wp) {
|
||||||
DSSERR("can't ioremap WP\n");
|
DSSERR("can't ioremap WP\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -1072,7 +1072,7 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
r = hdmi_get_clocks(pdev);
|
r = hdmi_get_clocks(pdev);
|
||||||
if (r) {
|
if (r) {
|
||||||
iounmap(hdmi.ip_data.base_wp);
|
DSSERR("can't get clocks\n");
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1117,8 +1117,6 @@ static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
|
||||||
|
|
||||||
hdmi_put_clocks();
|
hdmi_put_clocks();
|
||||||
|
|
||||||
iounmap(hdmi.ip_data.base_wp);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue