diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-02-06 08:46:58 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-02-12 09:33:43 +0100 |
commit | 7649473f40fc037263c1c0a9f54ffa5434080d78 (patch) | |
tree | b71e0376c2dad7f604611eeeafca36bf8cb98894 /drivers/mtd/core.c | |
parent | 99bed342782b4cd0f3f9b943f858971c29936e10 (diff) | |
download | barebox-7649473f40fc037263c1c0a9f54ffa5434080d78.tar.gz barebox-7649473f40fc037263c1c0a9f54ffa5434080d78.tar.xz |
mtd: nand: remove automatically created bb devices
the bb devices which are created in add_mtd_device() must be removed
in del_mtd_device(). Also remove deletion of the bb devices in the
mtdparts-add environment file.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/core.c')
-rw-r--r-- | drivers/mtd/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c index f5c03db1d7..813edc5afe 100644 --- a/drivers/mtd/core.c +++ b/drivers/mtd/core.c @@ -447,6 +447,8 @@ int del_mtd_device (struct mtd_info *mtd) hook->del_mtd_device(mtd, &hook->priv); devfs_remove(&mtd->cdev); + if (mtd->cdev_bb) + mtd_del_bb(mtd); unregister_device(&mtd->class_dev); free(mtd->param_size.value); free(mtd->cdev.name); |