From a621aaed690b9439141c555941b6af53873f6ff1 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Thu, 12 Jan 2006 18:43:35 +0000 Subject: [MMC+MFD] Convert mmc to mutexes convert mfd and mmc to mutexes Signed-off-by: Arjan van de Ven Signed-off-by: Russell King --- drivers/mmc/mmc_block.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'drivers/mmc/mmc_block.c') diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index f2c42b13945d..9b7c37e0e574 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -57,33 +58,33 @@ struct mmc_blk_data { unsigned int read_only; }; -static DECLARE_MUTEX(open_lock); +static DEFINE_MUTEX(open_lock); static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk) { struct mmc_blk_data *md; - down(&open_lock); + mutex_lock(&open_lock); md = disk->private_data; if (md && md->usage == 0) md = NULL; if (md) md->usage++; - up(&open_lock); + mutex_unlock(&open_lock); return md; } static void mmc_blk_put(struct mmc_blk_data *md) { - down(&open_lock); + mutex_lock(&open_lock); md->usage--; if (md->usage == 0) { put_disk(md->disk); mmc_cleanup_queue(&md->queue); kfree(md); } - up(&open_lock); + mutex_unlock(&open_lock); } static int mmc_blk_open(struct inode *inode, struct file *filp) -- cgit v1.2.3