mtd: concat: refactor concat_lock/concat_unlock
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Wed, 22 May 2019 23:19:47 +0000 (11:19 +1200)
committerRichard Weinberger <richard@nod.at>
Sun, 7 Jul 2019 18:39:16 +0000 (20:39 +0200)
commit6a08a2f12781ca788759ff73acf1f36f6ae3f9b7
tree7fb10893ff8afab15e9bfd7200c9ed58a15a71a6
parentdf616d7a442b90798d63fbf4447154bbbb9040b1
mtd: concat: refactor concat_lock/concat_unlock

concat_lock() and concat_unlock() only differed in terms of the mtd_xx
operation they called. Refactor them to use a common helper function and
pass a boolean flag to indicate whether lock or unlock is needed.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/mtdconcat.c