From: Axel Lin Date: Fri, 3 Jun 2011 06:10:22 +0000 (+0800) Subject: mtd: mtdblock: Use DEFINE_MUTEX() for mtdblks_lock X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7578ca927b1a2a0445c9a3166d05462b9ffd4c06;p=linux-beck.git mtd: mtdblock: Use DEFINE_MUTEX() for mtdblks_lock mtdblks_lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Signed-off-by: Axel Lin Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c index 3326615ad66b..1976b6c0508d 100644 --- a/drivers/mtd/mtdblock.c +++ b/drivers/mtd/mtdblock.c @@ -44,7 +44,7 @@ struct mtdblk_dev { enum { STATE_EMPTY, STATE_CLEAN, STATE_DIRTY } cache_state; }; -static struct mutex mtdblks_lock; +static DEFINE_MUTEX(mtdblks_lock); /* * Cache stuff... @@ -389,8 +389,6 @@ static struct mtd_blktrans_ops mtdblock_tr = { static int __init init_mtdblock(void) { - mutex_init(&mtdblks_lock); - return register_mtd_blktrans(&mtdblock_tr); }