aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-12-02 10:54:22 +0100
committerJagan Teki <jagan@amarulasolutions.com>2018-12-06 00:45:36 +0530
commit4c47fd0b6bce62162e11b8a22e2eaf0d8f6673b1 (patch)
tree59ef6abd0b8e5927c5a7ffe9b51b51b8d25984c4 /include/linux
parentef6ce46ad889d935dce26133232943aa302bd901 (diff)
downloadu-boot-4c47fd0b6bce62162e11b8a22e2eaf0d8f6673b1.zip
u-boot-4c47fd0b6bce62162e11b8a22e2eaf0d8f6673b1.tar.gz
u-boot-4c47fd0b6bce62162e11b8a22e2eaf0d8f6673b1.tar.bz2
mtd: Add a function to report when the MTD dev list has been updated
We need to parse mtdparts/mtids again everytime a device has been added/removed from the MTD list, but there's currently no way to know when such an update has been done. Add an ->updated field to the idr struct that we set to true every time a device is added/removed and expose a function returning the value of this field and resetting it to false. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Tested-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mtd/mtd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 68e5915..d20ebd8 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -581,6 +581,7 @@ int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
void mtd_get_len_incl_bad(struct mtd_info *mtd, uint64_t offset,
const uint64_t length, uint64_t *len_incl_bad,
int *truncated);
+bool mtd_dev_list_updated(void);
/* drivers/mtd/mtd_uboot.c */
int mtd_search_alternate_name(const char *mtdname, char *altname,