diff options
Diffstat (limited to 'drivers/mtd/nand/bf5xx_nand.c')
-rw-r--r-- | drivers/mtd/nand/bf5xx_nand.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c index a382e3dd0a5d..6fbeefa3a766 100644 --- a/drivers/mtd/nand/bf5xx_nand.c +++ b/drivers/mtd/nand/bf5xx_nand.c | |||
@@ -682,7 +682,6 @@ static int __devinit bf5xx_nand_add_partition(struct bf5xx_nand_info *info) | |||
682 | static int __devexit bf5xx_nand_remove(struct platform_device *pdev) | 682 | static int __devexit bf5xx_nand_remove(struct platform_device *pdev) |
683 | { | 683 | { |
684 | struct bf5xx_nand_info *info = to_nand_info(pdev); | 684 | struct bf5xx_nand_info *info = to_nand_info(pdev); |
685 | struct mtd_info *mtd = NULL; | ||
686 | 685 | ||
687 | platform_set_drvdata(pdev, NULL); | 686 | platform_set_drvdata(pdev, NULL); |
688 | 687 | ||
@@ -690,11 +689,7 @@ static int __devexit bf5xx_nand_remove(struct platform_device *pdev) | |||
690 | * and their partitions, then go through freeing the | 689 | * and their partitions, then go through freeing the |
691 | * resources used | 690 | * resources used |
692 | */ | 691 | */ |
693 | mtd = &info->mtd; | 692 | nand_release(&info->mtd); |
694 | if (mtd) { | ||
695 | nand_release(mtd); | ||
696 | kfree(mtd); | ||
697 | } | ||
698 | 693 | ||
699 | peripheral_free_list(bfin_nfc_pin_req); | 694 | peripheral_free_list(bfin_nfc_pin_req); |
700 | bf5xx_nand_dma_remove(info); | 695 | bf5xx_nand_dma_remove(info); |
@@ -710,7 +705,7 @@ static int bf5xx_nand_scan(struct mtd_info *mtd) | |||
710 | struct nand_chip *chip = mtd->priv; | 705 | struct nand_chip *chip = mtd->priv; |
711 | int ret; | 706 | int ret; |
712 | 707 | ||
713 | ret = nand_scan_ident(mtd, 1); | 708 | ret = nand_scan_ident(mtd, 1, NULL); |
714 | if (ret) | 709 | if (ret) |
715 | return ret; | 710 | return ret; |
716 | 711 | ||