diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-05-01 10:51:38 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-07-21 00:02:17 -0400 |
commit | a7d1a1ebd8f5858a812ac3d5fbbc178b4959a63b (patch) | |
tree | b96e8522469e2b228a265db89a9d2bc8f0b5e390 /drivers/mmc/core/host.c | |
parent | befe4048d8d20483a62636e20f3dbffebf85a1c1 (diff) |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index b8c5290571f1..74cf29a504f4 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
@@ -32,6 +32,7 @@ | |||
32 | static void mmc_host_classdev_release(struct device *dev) | 32 | static void mmc_host_classdev_release(struct device *dev) |
33 | { | 33 | { |
34 | struct mmc_host *host = cls_dev_to_mmc_host(dev); | 34 | struct mmc_host *host = cls_dev_to_mmc_host(dev); |
35 | mutex_destroy(&host->slot.lock); | ||
35 | kfree(host); | 36 | kfree(host); |
36 | } | 37 | } |
37 | 38 | ||
@@ -327,6 +328,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) | |||
327 | 328 | ||
328 | mmc_host_clk_init(host); | 329 | mmc_host_clk_init(host); |
329 | 330 | ||
331 | mutex_init(&host->slot.lock); | ||
330 | host->slot.cd_irq = -EINVAL; | 332 | host->slot.cd_irq = -EINVAL; |
331 | 333 | ||
332 | spin_lock_init(&host->lock); | 334 | spin_lock_init(&host->lock); |