public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] s3c nand: parsing commad-line partitions prior to set->partitions
@ 2010-07-13  4:56 Conke Hu
  2010-07-18  8:44 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Conke Hu @ 2010-07-13  4:56 UTC (permalink / raw)
  To: support, linux, ben-linux, linux-mtd, linux-kernel; +Cc: Conke Hu

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

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

* Re: [PATCH] s3c nand: parsing commad-line partitions prior to set->partitions
  2010-07-13  4:56 [PATCH] s3c nand: parsing commad-line partitions prior to set->partitions Conke Hu
@ 2010-07-18  8:44 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2010-07-18  8:44 UTC (permalink / raw)
  To: Conke Hu; +Cc: support, linux-mtd, linux, ben-linux, linux-kernel

On Tue, 2010-07-13 at 12:56 +0800, Conke Hu wrote:
> 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>

Pushed to l2-mtd-2.6.git / master, thanks.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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

end of thread, other threads:[~2010-07-18  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-13  4:56 [PATCH] s3c nand: parsing commad-line partitions prior to set->partitions Conke Hu
2010-07-18  8:44 ` Artem Bityutskiy

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