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>
}
/* 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;
}
hdmi_put_clocks();
- iounmap(hdmi.ip_data.base_wp);
-
return 0;
}