[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190522000753.13300-2-chris.packham@alliedtelesis.co.nz>
Date: Wed, 22 May 2019 12:07:53 +1200
From: Chris Packham <chris.packham@...iedtelesis.co.nz>
To: dwmw2@...radead.org, computersforpeace@...il.com,
marek.vasut@...il.com, miquel.raynal@...tlin.com, richard@....at,
vigneshr@...com
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
Chris Packham <chris.packham@...iedtelesis.co.nz>
Subject: [PATCH 2/2] mtd: concat: implement _is_locked mtd operation
Add an implementation of the _is_locked operation for concatenated mtd
devices. As with concat_lock/concat_unlock this can simply use the
common helper and pass mtd_is_locked as the operation.
Signed-off-by: Chris Packham <chris.packham@...iedtelesis.co.nz>
---
drivers/mtd/mtdconcat.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 9514cd2db63c..0e919f3423af 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -496,6 +496,11 @@ static int concat_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
return __concat_xxlock(mtd, ofs, len, mtd_unlock);
}
+static int concat_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len)
+{
+ return __concat_xxlock(mtd, ofs, len, mtd_is_locked);
+}
+
static void concat_sync(struct mtd_info *mtd)
{
struct mtd_concat *concat = CONCAT(mtd);
@@ -695,6 +700,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
concat->mtd._sync = concat_sync;
concat->mtd._lock = concat_lock;
concat->mtd._unlock = concat_unlock;
+ concat->mtd._is_locked = concat_is_locked;
concat->mtd._suspend = concat_suspend;
concat->mtd._resume = concat_resume;
--
2.21.0
Powered by blists - more mailing lists