summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/host.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-05-01 16:51:38 +0200
committerChris Ball <cjb@laptop.org>2012-07-21 00:02:17 -0400
commita7d1a1ebd8f5858a812ac3d5fbbc178b4959a63b (patch)
treeb96e8522469e2b228a265db89a9d2bc8f0b5e390 /drivers/mmc/core/host.c
parentbefe4048d8d20483a62636e20f3dbffebf85a1c1 (diff)
downloadop-kernel-dev-a7d1a1ebd8f5858a812ac3d5fbbc178b4959a63b.zip
op-kernel-dev-a7d1a1ebd8f5858a812ac3d5fbbc178b4959a63b.tar.gz
mmc: core: convert slot functions to managed allocation
This prepares for the addition of further slot functions. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core/host.c')
-rw-r--r--drivers/mmc/core/host.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index b8c5290..74cf29a 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -32,6 +32,7 @@
static void mmc_host_classdev_release(struct device *dev)
{
struct mmc_host *host = cls_dev_to_mmc_host(dev);
+ mutex_destroy(&host->slot.lock);
kfree(host);
}
@@ -327,6 +328,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
mmc_host_clk_init(host);
+ mutex_init(&host->slot.lock);
host->slot.cd_irq = -EINVAL;
spin_lock_init(&host->lock);
OpenPOWER on IntegriCloud