mtd: h720x-flash: convert to mtd_device_register()
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue May 24 21:59:10 EDT 2011
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=360e40aedb59799fef4ff58fe6b9436cd487f6e6
Commit: 360e40aedb59799fef4ff58fe6b9436cd487f6e6
Parent: fdbf3bf6b855233cd618021c702accb69b8b10bc
Author: Jamie Iles <jamie at jamieiles.com>
AuthorDate: Mon May 23 10:23:03 2011 +0100
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Wed May 25 02:21:46 2011 +0100
mtd: h720x-flash: convert to mtd_device_register()
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
preprocessor conditionals as partitioning is always available.
Signed-off-by: Jamie Iles <jamie at jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/maps/h720x-flash.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/maps/h720x-flash.c b/drivers/mtd/maps/h720x-flash.c
index 72c724f..7f03586 100644
--- a/drivers/mtd/maps/h720x-flash.c
+++ b/drivers/mtd/maps/h720x-flash.c
@@ -92,18 +92,16 @@ static int __init h720x_mtd_init(void)
if (mymtd) {
mymtd->owner = THIS_MODULE;
-#ifdef CONFIG_MTD_PARTITIONS
nr_mtd_parts = parse_mtd_partitions(mymtd, probes, &mtd_parts, 0);
if (nr_mtd_parts > 0)
part_type = "command line";
-#endif
if (nr_mtd_parts <= 0) {
mtd_parts = h720x_partitions;
nr_mtd_parts = NUM_PARTITIONS;
part_type = "builtin";
}
printk(KERN_INFO "Using %s partition table\n", part_type);
- add_mtd_partitions(mymtd, mtd_parts, nr_mtd_parts);
+ mtd_device_register(mymtd, mtd_parts, nr_mtd_parts);
return 0;
}
@@ -118,7 +116,7 @@ static void __exit h720x_mtd_cleanup(void)
{
if (mymtd) {
- del_mtd_partitions(mymtd);
+ mtd_device_unregister(mymtd);
map_destroy(mymtd);
}
More information about the linux-mtd-cvs
mailing list