[PATCH 2/2] mtd: mtdoob: Do not create for partitions

Sascha Hauer s.hauer at pengutronix.de
Thu Feb 13 13:48:34 EST 2014


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/mtd/mtdoob.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/mtdoob.c b/drivers/mtd/mtdoob.c
index 1e88b53..b9cac2a 100644
--- a/drivers/mtd/mtdoob.c
+++ b/drivers/mtd/mtdoob.c
@@ -73,7 +73,7 @@ static int add_mtdoob_device(struct mtd_info *mtd, char *devname, void **priv)
 {
 	struct mtdoob *mtdoob;
 
-	if (mtd->oobsize == 0)
+	if (mtd->master || mtd->oobsize == 0)
 		return 0;
 
 	mtdoob = xzalloc(sizeof(*mtdoob));
@@ -93,6 +93,9 @@ static int del_mtdoob_device(struct mtd_info *mtd, void **priv)
 {
 	struct mtdoob *mtdoob;
 
+	if (mtd->master || mtd->oobsize == 0)
+		return 0;
+
 	mtdoob = *priv;
 	devfs_remove(&mtdoob->cdev);
 	free(mtdoob);
-- 
1.8.5.3




More information about the barebox mailing list