From: Conke Hu <conke@maxwit.com>
To: support@simtec.co.uk, linux@simtec.co.uk, ben-linux@fluff.org,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: Conke Hu <conke@maxwit.com>
Subject: [PATCH] s3c nand: parsing commad-line partitions prior to set->partitions
Date: Tue, 13 Jul 2010 12:56:30 +0800 [thread overview]
Message-ID: <1278996990-4380-1-git-send-email-conke@maxwit.com> (raw)
Current driver prevents command-line partitions from being parsed when built-in
partitions are defined in s3c2410_nand_set object, but it is not desirable in some
cases. This patch tries to parse commad-line partitions prior to the built-in.
Signed-off-by: Conke Hu <conke@maxwit.com>
---
drivers/mtd/nand/s3c2410.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 239aadf..33d832d 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -727,15 +727,12 @@ static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,
if (set == NULL)
return add_mtd_device(&mtd->mtd);
- if (set->nr_partitions == 0) {
- mtd->mtd.name = set->name;
- nr_part = parse_mtd_partitions(&mtd->mtd, part_probes,
- &part_info, 0);
- } else {
- if (set->nr_partitions > 0 && set->partitions != NULL) {
- nr_part = set->nr_partitions;
- part_info = set->partitions;
- }
+ mtd->mtd.name = set->name;
+ nr_part = parse_mtd_partitions(&mtd->mtd, part_probes, &part_info, 0);
+
+ if (nr_part <= 0 && set->nr_partitions > 0) {
+ nr_part = set->nr_partitions;
+ part_info = set->partitions;
}
if (nr_part > 0 && part_info)
--
1.7.0.4
next reply other threads:[~2010-07-13 4:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 4:56 Conke Hu [this message]
2010-07-18 8:44 ` [PATCH] s3c nand: parsing commad-line partitions prior to set->partitions Artem Bityutskiy
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=1278996990-4380-1-git-send-email-conke@maxwit.com \
--to=conke@maxwit.com \
--cc=ben-linux@fluff.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@simtec.co.uk \
--cc=support@simtec.co.uk \
/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