From a7d1a1ebd8f5858a812ac3d5fbbc178b4959a63b Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 1 May 2012 16:51:38 +0200 Subject: mmc: core: convert slot functions to managed allocation This prepares for the addition of further slot functions. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Chris Ball --- drivers/mmc/core/host.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/mmc/core/host.c') 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 @@ 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); -- cgit v1.2.3