From 767469c6577fbb77c3012f6e5c233c3085c2db72 Mon Sep 17 00:00:00 2001 From: Jamie Iles Date: Mon, 23 May 2011 10:23:19 +0100 Subject: [PATCH] --- yaml --- r: 252543 b: refs/heads/master c: 0f47e952fe8b9eb67c24b96e7c48c075657634ba h: refs/heads/master i: 252541: 65b696137c2e61ec3b8ea6a361d47ff71e0f23f0 252539: 6262922103d683dd09463c0a62e222295ce53b1a 252535: 255ec21893bd1e48fbd8265b01bd896f209272e3 252527: 4d726e5587ae47f249034851110399678616b919 252511: 6bf6e46478f7861d307e8a282d756b0c23d74cc8 252479: 0cd10096095705048c0cfa894bc09bb421a7fbb4 252415: e5875fedb346d082f3b83c05ffb4745810dcb7f0 v: v3 --- [refs] | 2 +- trunk/drivers/mtd/nand/diskonchip.c | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 8c826524e4a8..9e8939a23eba 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 098771158813fb391dd6c1c8b907599db91fb0c7 +refs/heads/master: 0f47e952fe8b9eb67c24b96e7c48c075657634ba diff --git a/trunk/drivers/mtd/nand/diskonchip.c b/trunk/drivers/mtd/nand/diskonchip.c index 657b9f4b6f9b..7837728d02ff 100644 --- a/trunk/drivers/mtd/nand/diskonchip.c +++ b/trunk/drivers/mtd/nand/diskonchip.c @@ -1360,11 +1360,9 @@ static int __init nftl_scan_bbt(struct mtd_info *mtd) At least as nand_bbt.c is currently written. */ if ((ret = nand_scan_bbt(mtd, NULL))) return ret; - add_mtd_device(mtd); -#ifdef CONFIG_MTD_PARTITIONS + mtd_device_register(mtd, NULL, 0); if (!no_autopart) - add_mtd_partitions(mtd, parts, numparts); -#endif + mtd_device_register(mtd, parts, numparts); return 0; } @@ -1419,11 +1417,9 @@ static int __init inftl_scan_bbt(struct mtd_info *mtd) autopartitioning, but I want to give it more thought. */ if (!numparts) return -EIO; - add_mtd_device(mtd); -#ifdef CONFIG_MTD_PARTITIONS + mtd_device_register(mtd, NULL, 0); if (!no_autopart) - add_mtd_partitions(mtd, parts, numparts); -#endif + mtd_device_register(mtd, parts, numparts); return 0; } @@ -1678,9 +1674,9 @@ static int __init doc_probe(unsigned long physadr) /* DBB note: i believe nand_release is necessary here, as buffers may have been allocated in nand_base. Check with Thomas. FIX ME! */ - /* nand_release will call del_mtd_device, but we haven't yet - added it. This is handled without incident by - del_mtd_device, as far as I can tell. */ + /* nand_release will call mtd_device_unregister, but we + haven't yet added it. This is handled without incident by + mtd_device_unregister, as far as I can tell. */ nand_release(mtd); kfree(mtd); goto fail;