Skip to content

Commit

Permalink
mtd: mtdblock: Use DEFINE_MUTEX() for mtdblks_lock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 82e023a commit 7578ca9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mtd/mtdblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 7578ca9

Please sign in to comment.