aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdblock.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-06-03 02:10:22 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-11 08:01:59 -0400
commit7578ca927b1a2a0445c9a3166d05462b9ffd4c06 (patch)
treed6020576a6d55239bf081ed9d169c27c1bdc4795 /drivers/mtd/mtdblock.c
parent82e023ab4e144da7f83fe7e6c93a09be2f30ff07 (diff)
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 <axel.lin@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/mtdblock.c')
-rw-r--r--drivers/mtd/mtdblock.c4
1 files changed, 1 insertions, 3 deletions
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 {
44 enum { STATE_EMPTY, STATE_CLEAN, STATE_DIRTY } cache_state; 44 enum { STATE_EMPTY, STATE_CLEAN, STATE_DIRTY } cache_state;
45}; 45};
46 46
47static struct mutex mtdblks_lock; 47static DEFINE_MUTEX(mtdblks_lock);
48 48
49/* 49/*
50 * Cache stuff... 50 * Cache stuff...
@@ -389,8 +389,6 @@ static struct mtd_blktrans_ops mtdblock_tr = {
389 389
390static int __init init_mtdblock(void) 390static int __init init_mtdblock(void)
391{ 391{
392 mutex_init(&mtdblks_lock);
393
394 return register_mtd_blktrans(&mtdblock_tr); 392 return register_mtd_blktrans(&mtdblock_tr);
395} 393}
396 394