* [PATCH] mtd: mtdblock: Use DEFINE_MUTEX() for mtdblks_lock
@ 2011-06-03 6:10 Axel Lin
2011-06-06 10:20 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-06-03 6:10 UTC (permalink / raw)
To: linux-kernel
Cc: Artem Bityutskiy, Matthias Kaehlcke, David Woodhouse, linux-mtd
mtdblks_lock can be initialized automatically with
DEFINE_MUTEX() rather than explicitly calling mutex_init().
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/mtd/mtdblock.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
index 3326615..1976b6c 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);
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-06 10:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-03 6:10 [PATCH] mtd: mtdblock: Use DEFINE_MUTEX() for mtdblks_lock Axel Lin
2011-06-06 10:20 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox