forked from OERV-BSP/u-boot
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>
This commit is contained in:
committed by
Jagan Teki
parent
ef6ce46ad8
commit
4c47fd0b6b
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user