mtd: intel_vr_nor.c: use mtd_device_parse_register
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Nov 7 11:59:13 EST 2011
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=ba6bead4469bec8a66f1764106f23890b2a267e2
Commit: ba6bead4469bec8a66f1764106f23890b2a267e2
Parent: 5003403b87283a5e304e0248918ef678dbd24d59
Author: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
AuthorDate: Thu Jun 2 17:59:45 2011 +0400
Committer: Artem Bityutskiy <artem.bityutskiy at intel.com>
CommitDate: Sun Sep 11 15:02:06 2011 +0300
mtd: intel_vr_nor.c: use mtd_device_parse_register
Replace custom invocations of parse_mtd_partitions and mtd_device_register
with common mtd_device_parse_register call. This would bring: standard
handling of all errors, fallback to default partitions, etc.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
---
drivers/mtd/maps/intel_vr_nor.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/maps/intel_vr_nor.c b/drivers/mtd/maps/intel_vr_nor.c
index fd612c7..08c2396 100644
--- a/drivers/mtd/maps/intel_vr_nor.c
+++ b/drivers/mtd/maps/intel_vr_nor.c
@@ -44,7 +44,6 @@ struct vr_nor_mtd {
void __iomem *csr_base;
struct map_info map;
struct mtd_info *info;
- int nr_parts;
struct pci_dev *dev;
};
@@ -71,12 +70,9 @@ static void __devexit vr_nor_destroy_partitions(struct vr_nor_mtd *p)
static int __devinit vr_nor_init_partitions(struct vr_nor_mtd *p)
{
- struct mtd_partition *parts;
-
/* register the flash bank */
/* partition the flash bank */
- p->nr_parts = parse_mtd_partitions(p->info, NULL, &parts, 0);
- return mtd_device_register(p->info, parts, p->nr_parts);
+ return mtd_device_parse_register(p->info, NULL, 0, NULL, 0);
}
static void __devexit vr_nor_destroy_mtd_setup(struct vr_nor_mtd *p)
More information about the linux-mtd-cvs
mailing list