Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

authored by

Dmitry Eremin-Solenikov and committed by
Artem Bityutskiy
ba6bead4 5003403b

+1 -5
+1 -5
drivers/mtd/maps/intel_vr_nor.c
··· 44 44 void __iomem *csr_base; 45 45 struct map_info map; 46 46 struct mtd_info *info; 47 - int nr_parts; 48 47 struct pci_dev *dev; 49 48 }; 50 49 ··· 70 71 71 72 static int __devinit vr_nor_init_partitions(struct vr_nor_mtd *p) 72 73 { 73 - struct mtd_partition *parts; 74 - 75 74 /* register the flash bank */ 76 75 /* partition the flash bank */ 77 - p->nr_parts = parse_mtd_partitions(p->info, NULL, &parts, 0); 78 - return mtd_device_register(p->info, parts, p->nr_parts); 76 + return mtd_device_parse_register(p->info, NULL, 0, NULL, 0); 79 77 } 80 78 81 79 static void __devexit vr_nor_destroy_mtd_setup(struct vr_nor_mtd *p)