mmc: sdhci-s3c: use devm_ functions
authorJulia Lawall <Julia.Lawall@lip6.fr>
Fri, 9 Mar 2012 04:24:53 +0000 (23:24 -0500)
committerChris Ball <cjb@laptop.org>
Sun, 1 Apr 2012 03:30:48 +0000 (23:30 -0400)
commitfa4908551219ee69f169286acea57fcea998a148
treef4f6f8317a7208b8fa7f477e568d1a7b99e49f6f
parentcead45ae6bd58102e6b5fbd39c1f493a86d1a101
mmc: sdhci-s3c: 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.

By using devm_ioremap, it also removes a potential memory leak, because
there was no call to iounmap in the probe function.

The call to platform_get_resource was moved just to make it closer to the
place where its result it used.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-s3c.c