aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/rfbi.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-01-24 08:00:45 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-01-25 06:48:35 -0500
commit6e2a14d2c59f6208310eeb6b031e9d1c22b38c6a (patch)
tree8267f62f049f5cbd82800f9719ee550b74dc3821 /drivers/video/omap2/dss/rfbi.c
parentcc1d3e032df53d83d0ca4d537d8eb67eb5b3e808 (diff)
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.c5
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)
925 r = -EINVAL; 925 r = -EINVAL;
926 goto err_ioremap; 926 goto err_ioremap;
927 } 927 }
928 rfbi.base = ioremap(rfbi_mem->start, resource_size(rfbi_mem)); 928 rfbi.base = devm_ioremap(&pdev->dev, rfbi_mem->start,
929 resource_size(rfbi_mem));
929 if (!rfbi.base) { 930 if (!rfbi.base) {
930 DSSERR("can't ioremap RFBI\n"); 931 DSSERR("can't ioremap RFBI\n");
931 r = -ENOMEM; 932 r = -ENOMEM;
@@ -963,7 +964,6 @@ err_get_ick:
963 rfbi_runtime_put(); 964 rfbi_runtime_put();
964err_get_rfbi: 965err_get_rfbi:
965 pm_runtime_disable(&pdev->dev); 966 pm_runtime_disable(&pdev->dev);
966 iounmap(rfbi.base);
967err_ioremap: 967err_ioremap:
968 return r; 968 return r;
969} 969}
@@ -971,7 +971,6 @@ err_ioremap:
971static int omap_rfbihw_remove(struct platform_device *pdev) 971static int omap_rfbihw_remove(struct platform_device *pdev)
972{ 972{
973 pm_runtime_disable(&pdev->dev); 973 pm_runtime_disable(&pdev->dev);
974 iounmap(rfbi.base);
975 return 0; 974 return 0;
976} 975}
977 976