diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-10-23 13:56:16 +0200 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-10-23 13:56:16 +0200 |
commit | ff67a6b9aaddb2dea6ed4a3f7df8a0c6acf131c2 (patch) | |
tree | 34d81901340c14191fab6e0c5a424f45385ae2aa /drivers/mtd/maps/h720x-flash.c | |
parent | e7549b926dd3ceec048f5689df90d4ec970c9419 (diff) | |
download | kernel_samsung_smdk4412-ff67a6b9aaddb2dea6ed4a3f7df8a0c6acf131c2.zip kernel_samsung_smdk4412-ff67a6b9aaddb2dea6ed4a3f7df8a0c6acf131c2.tar.gz kernel_samsung_smdk4412-ff67a6b9aaddb2dea6ed4a3f7df8a0c6acf131c2.tar.bz2 |
last driver import from 3.2.72 for now
Diffstat (limited to 'drivers/mtd/maps/h720x-flash.c')
-rw-r--r-- | drivers/mtd/maps/h720x-flash.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/mtd/maps/h720x-flash.c b/drivers/mtd/maps/h720x-flash.c index 7f03586..49c1418 100644 --- a/drivers/mtd/maps/h720x-flash.c +++ b/drivers/mtd/maps/h720x-flash.c @@ -58,18 +58,11 @@ static struct mtd_partition h720x_partitions[] = { #define NUM_PARTITIONS ARRAY_SIZE(h720x_partitions) -static int nr_mtd_parts; -static struct mtd_partition *mtd_parts; -static const char *probes[] = { "cmdlinepart", NULL }; - /* * Initialize FLASH support */ static int __init h720x_mtd_init(void) { - - char *part_type = NULL; - h720x_map.virt = ioremap(h720x_map.phys, h720x_map.size); if (!h720x_map.virt) { @@ -92,16 +85,8 @@ static int __init h720x_mtd_init(void) if (mymtd) { mymtd->owner = THIS_MODULE; - nr_mtd_parts = parse_mtd_partitions(mymtd, probes, &mtd_parts, 0); - if (nr_mtd_parts > 0) - part_type = "command line"; - 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); - mtd_device_register(mymtd, mtd_parts, nr_mtd_parts); + mtd_device_parse_register(mymtd, NULL, 0, + h720x_partitions, NUM_PARTITIONS); return 0; } @@ -120,10 +105,6 @@ static void __exit h720x_mtd_cleanup(void) map_destroy(mymtd); } - /* Free partition info, if commandline partition was used */ - if (mtd_parts && (mtd_parts != h720x_partitions)) - kfree (mtd_parts); - if (h720x_map.virt) { iounmap((void *)h720x_map.virt); h720x_map.virt = 0; |