mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd oob: do not register oob device for devices without oob
@ 2012-11-29 19:03 Sascha Hauer
  2012-11-29 19:03 ` [PATCH 2/2] mtd core: call driver write function with complete buffer Sascha Hauer
  0 siblings, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2012-11-29 19:03 UTC (permalink / raw)
  To: barebox

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

diff --git a/drivers/mtd/mtdoob.c b/drivers/mtd/mtdoob.c
index c7bf40c..e5d8039 100644
--- a/drivers/mtd/mtdoob.c
+++ b/drivers/mtd/mtdoob.c
@@ -73,6 +73,9 @@ static int add_mtdoob_device(struct mtd_info *mtd, char *devname, void **priv)
 {
 	struct mtdoob *mtdoob;
 
+	if (mtd->oobsize == 0)
+		return 0;
+
 	mtdoob = xzalloc(sizeof(*mtdoob));
 	mtdoob->cdev.ops = &mtd_ops_oob;
 	mtdoob->cdev.size = (mtd->size / mtd->writesize) * mtd->oobsize;
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-12-07 13:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-29 19:03 [PATCH 1/2] mtd oob: do not register oob device for devices without oob Sascha Hauer
2012-11-29 19:03 ` [PATCH 2/2] mtd core: call driver write function with complete buffer Sascha Hauer
2012-12-03 19:10   ` Robert Jarzmik
2012-12-05 16:53   ` Jean-Christophe PLAGNIOL-VILLARD
2012-12-05 17:15     ` [PATCH 1/1] mtd: nand: fix unaligned write support Jean-Christophe PLAGNIOL-VILLARD
2012-12-05 18:28       ` Sascha Hauer
2012-12-07 13:17         ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox