diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-01-24 14:00:45 +0100 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-01-25 13:48:35 +0200 |
commit | 6e2a14d2c59f6208310eeb6b031e9d1c22b38c6a (patch) | |
tree | 8267f62f049f5cbd82800f9719ee550b74dc3821 /drivers/video/omap2/dss/rfbi.c | |
parent | cc1d3e032df53d83d0ca4d537d8eb67eb5b3e808 (diff) | |
download | lwn-6e2a14d2c59f6208310eeb6b031e9d1c22b38c6a.tar.gz lwn-6e2a14d2c59f6208310eeb6b031e9d1c22b38c6a.zip |
OMAPDSS: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches. This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/rfbi.c')
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 814bb9500dca..159e914063c0 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c @@ -925,7 +925,8 @@ static int omap_rfbihw_probe(struct platform_device *pdev) r = -EINVAL; goto err_ioremap; } - rfbi.base = ioremap(rfbi_mem->start, resource_size(rfbi_mem)); + rfbi.base = devm_ioremap(&pdev->dev, rfbi_mem->start, + resource_size(rfbi_mem)); if (!rfbi.base) { DSSERR("can't ioremap RFBI\n"); r = -ENOMEM; @@ -963,7 +964,6 @@ err_get_ick: rfbi_runtime_put(); err_get_rfbi: pm_runtime_disable(&pdev->dev); - iounmap(rfbi.base); err_ioremap: return r; } @@ -971,7 +971,6 @@ err_ioremap: static int omap_rfbihw_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - iounmap(rfbi.base); return 0; } |