diff options
| author | Jamie Iles <jamie@jamieiles.com> | 2011-05-23 05:23:19 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-05-24 21:23:21 -0400 |
| commit | 0f47e952fe8b9eb67c24b96e7c48c075657634ba (patch) | |
| tree | a792ba834246fd2cd4575e171731ca7205ab719b | |
| parent | 098771158813fb391dd6c1c8b907599db91fb0c7 (diff) | |
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: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| -rw-r--r-- | drivers/mtd/nand/diskonchip.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index 657b9f4b6f9b..7837728d02ff 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c | |||
| @@ -1360,11 +1360,9 @@ static int __init nftl_scan_bbt(struct mtd_info *mtd) | |||
| 1360 | At least as nand_bbt.c is currently written. */ | 1360 | At least as nand_bbt.c is currently written. */ |
| 1361 | if ((ret = nand_scan_bbt(mtd, NULL))) | 1361 | if ((ret = nand_scan_bbt(mtd, NULL))) |
| 1362 | return ret; | 1362 | return ret; |
| 1363 | add_mtd_device(mtd); | 1363 | mtd_device_register(mtd, NULL, 0); |
| 1364 | #ifdef CONFIG_MTD_PARTITIONS | ||
| 1365 | if (!no_autopart) | 1364 | if (!no_autopart) |
| 1366 | add_mtd_partitions(mtd, parts, numparts); | 1365 | mtd_device_register(mtd, parts, numparts); |
| 1367 | #endif | ||
| 1368 | return 0; | 1366 | return 0; |
| 1369 | } | 1367 | } |
| 1370 | 1368 | ||
| @@ -1419,11 +1417,9 @@ static int __init inftl_scan_bbt(struct mtd_info *mtd) | |||
| 1419 | autopartitioning, but I want to give it more thought. */ | 1417 | autopartitioning, but I want to give it more thought. */ |
| 1420 | if (!numparts) | 1418 | if (!numparts) |
| 1421 | return -EIO; | 1419 | return -EIO; |
| 1422 | add_mtd_device(mtd); | 1420 | mtd_device_register(mtd, NULL, 0); |
| 1423 | #ifdef CONFIG_MTD_PARTITIONS | ||
| 1424 | if (!no_autopart) | 1421 | if (!no_autopart) |
| 1425 | add_mtd_partitions(mtd, parts, numparts); | 1422 | mtd_device_register(mtd, parts, numparts); |
| 1426 | #endif | ||
| 1427 | return 0; | 1423 | return 0; |
| 1428 | } | 1424 | } |
| 1429 | 1425 | ||
| @@ -1678,9 +1674,9 @@ static int __init doc_probe(unsigned long physadr) | |||
| 1678 | /* DBB note: i believe nand_release is necessary here, as | 1674 | /* DBB note: i believe nand_release is necessary here, as |
| 1679 | buffers may have been allocated in nand_base. Check with | 1675 | buffers may have been allocated in nand_base. Check with |
| 1680 | Thomas. FIX ME! */ | 1676 | Thomas. FIX ME! */ |
| 1681 | /* nand_release will call del_mtd_device, but we haven't yet | 1677 | /* nand_release will call mtd_device_unregister, but we |
| 1682 | added it. This is handled without incident by | 1678 | haven't yet added it. This is handled without incident by |
| 1683 | del_mtd_device, as far as I can tell. */ | 1679 | mtd_device_unregister, as far as I can tell. */ |
| 1684 | nand_release(mtd); | 1680 | nand_release(mtd); |
| 1685 | kfree(mtd); | 1681 | kfree(mtd); |
| 1686 | goto fail; | 1682 | goto fail; |
