From: Robert Jarzmik <robert.jarzmik@free.fr>
To: barebox@lists.infradead.org
Subject: [PATCH V4 4/7] drivers/mtd: fix core multiple MTD registrations
Date: Wed, 21 Dec 2011 22:30:41 +0100 [thread overview]
Message-ID: <1324503044-6085-4-git-send-email-robert.jarzmik@free.fr> (raw)
In-Reply-To: <1324503044-6085-1-git-send-email-robert.jarzmik@free.fr>
If multiple MTD devices were registered, an exception
occured, as they all wanted id 0. Let the driver code choose
the device number dynamically.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
drivers/mtd/core.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index a4f91be..0eb91c5 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -250,6 +250,7 @@ int add_mtd_device(struct mtd_info *mtd, char *devname)
if (!devname)
devname = "mtd";
strcpy(mtd->class_dev.name, devname);
+ mtd->class_dev.id = -1;
register_device(&mtd->class_dev);
mtd->cdev.ops = &mtd_ops;
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-12-21 21:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 21:30 [PATCH V4 1/7] drivers/mtd: move nand.c into core.c Robert Jarzmik
2011-12-21 21:30 ` [PATCH V4 2/7] drivers/mtd: cosmetic changes Robert Jarzmik
2011-12-21 21:30 ` [PATCH V4 3/7] drivers/mtd: transfer NAND notions to MTD core Robert Jarzmik
2011-12-21 21:30 ` Robert Jarzmik [this message]
2011-12-21 21:30 ` [PATCH V4 5/7] drivers/mtd: add mtd core hooks Robert Jarzmik
2011-12-21 21:30 ` [PATCH V4 6/7] drivers/mtd: split mtd mtdoob devices Robert Jarzmik
2011-12-21 21:30 ` [PATCH V4 7/7] drivers/mtd: add the mtdraw device (data+oob) Robert Jarzmik
2011-12-22 9:18 ` [PATCH V4 1/7] drivers/mtd: move nand.c into core.c Sascha Hauer
2011-12-22 10:05 ` Robert Jarzmik
2011-12-31 8:29 ` Jean-Christophe PLAGNIOL-VILLARD
2011-12-31 13:43 ` Robert Jarzmik
2011-12-31 14:13 ` Jean-Christophe PLAGNIOL-VILLARD
2012-01-02 11:53 ` Sascha Hauer
2012-01-03 8:00 ` Jean-Christophe PLAGNIOL-VILLARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324503044-6085-4-git-send-email-robert.jarzmik@free.fr \
--to=robert.jarzmik@free.fr \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox