Commit 0f47e952 authored by Jamie Iles's avatar Jamie Iles Committed by David Woodhouse

mtd: diskonchip: 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: default avatarJamie Iles <jamie@jamieiles.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 09877115
...@@ -1360,11 +1360,9 @@ static int __init nftl_scan_bbt(struct mtd_info *mtd) ...@@ -1360,11 +1360,9 @@ static int __init nftl_scan_bbt(struct mtd_info *mtd)
At least as nand_bbt.c is currently written. */ At least as nand_bbt.c is currently written. */
if ((ret = nand_scan_bbt(mtd, NULL))) if ((ret = nand_scan_bbt(mtd, NULL)))
return ret; return ret;
add_mtd_device(mtd); mtd_device_register(mtd, NULL, 0);
#ifdef CONFIG_MTD_PARTITIONS
if (!no_autopart) if (!no_autopart)
add_mtd_partitions(mtd, parts, numparts); mtd_device_register(mtd, parts, numparts);
#endif
return 0; return 0;
} }
...@@ -1419,11 +1417,9 @@ static int __init inftl_scan_bbt(struct mtd_info *mtd) ...@@ -1419,11 +1417,9 @@ static int __init inftl_scan_bbt(struct mtd_info *mtd)
autopartitioning, but I want to give it more thought. */ autopartitioning, but I want to give it more thought. */
if (!numparts) if (!numparts)
return -EIO; return -EIO;
add_mtd_device(mtd); mtd_device_register(mtd, NULL, 0);
#ifdef CONFIG_MTD_PARTITIONS
if (!no_autopart) if (!no_autopart)
add_mtd_partitions(mtd, parts, numparts); mtd_device_register(mtd, parts, numparts);
#endif
return 0; return 0;
} }
...@@ -1678,9 +1674,9 @@ static int __init doc_probe(unsigned long physadr) ...@@ -1678,9 +1674,9 @@ static int __init doc_probe(unsigned long physadr)
/* DBB note: i believe nand_release is necessary here, as /* DBB note: i believe nand_release is necessary here, as
buffers may have been allocated in nand_base. Check with buffers may have been allocated in nand_base. Check with
Thomas. FIX ME! */ Thomas. FIX ME! */
/* nand_release will call del_mtd_device, but we haven't yet /* nand_release will call mtd_device_unregister, but we
added it. This is handled without incident by haven't yet added it. This is handled without incident by
del_mtd_device, as far as I can tell. */ mtd_device_unregister, as far as I can tell. */
nand_release(mtd); nand_release(mtd);
kfree(mtd); kfree(mtd);
goto fail; goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment