summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/core.c')
-rw-r--r--drivers/mtd/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index c97c8c1403..d954f72886 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -409,6 +409,9 @@ int add_mtd_device(struct mtd_info *mtd, char *devname, int device_id)
devfs_create(&mtd->cdev);
+ if (mtd_can_have_bb(mtd))
+ mtd->cdev_bb = mtd_add_bb(mtd, NULL);
+
if (mtd->parent && !mtd->master)
of_parse_partitions(&mtd->cdev, mtd->parent->device_node);