]> git.baikalelectronics.ru Git - uboot.git/commit
mtd: Add a function to report when the MTD dev list has been updated
authorBoris Brezillon <boris.brezillon@bootlin.com>
Sun, 2 Dec 2018 09:54:22 +0000 (10:54 +0100)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 5 Dec 2018 19:15:36 +0000 (00:45 +0530)
commit87e7a94ccf6c2fbf5e1106a5eecc3c37ed8a915d
tree59ef6abd0b8e5927c5a7ffe9b51b51b8d25984c4
parent916c0c4e14912f246edf090f2c3ef177c4bb181d
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>
drivers/mtd/mtdcore.c
include/linux/mtd/mtd.h