Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.infradead.org/~dwmw2/mtd-2.6.30

* git://git.infradead.org/~dwmw2/mtd-2.6.30:
jffs2: Fix corruption when flash erase/write failure
mtd: MXC NAND driver fixes (v5)

+23 -27
+23 -20
drivers/mtd/nand/mxc_nand.c
··· 831 831 break; 832 832 833 833 case NAND_CMD_READID: 834 + host->col_addr = 0; 834 835 send_read_id(host); 835 836 break; 836 837 ··· 868 867 mtd->priv = this; 869 868 mtd->owner = THIS_MODULE; 870 869 mtd->dev.parent = &pdev->dev; 870 + mtd->name = "mxc_nand"; 871 871 872 872 /* 50 us command delay time */ 873 873 this->chip_delay = 5; ··· 884 882 this->verify_buf = mxc_nand_verify_buf; 885 883 886 884 host->clk = clk_get(&pdev->dev, "nfc"); 887 - if (IS_ERR(host->clk)) 885 + if (IS_ERR(host->clk)) { 886 + err = PTR_ERR(host->clk); 888 887 goto eclk; 888 + } 889 889 890 890 clk_enable(host->clk); 891 891 host->clk_act = 1; ··· 900 896 901 897 host->regs = ioremap(res->start, res->end - res->start + 1); 902 898 if (!host->regs) { 903 - err = -EIO; 899 + err = -ENOMEM; 904 900 goto eres; 905 901 } 906 902 ··· 1015 1011 #ifdef CONFIG_PM 1016 1012 static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state) 1017 1013 { 1018 - struct mtd_info *info = platform_get_drvdata(pdev); 1014 + struct mtd_info *mtd = platform_get_drvdata(pdev); 1015 + struct nand_chip *nand_chip = mtd->priv; 1016 + struct mxc_nand_host *host = nand_chip->priv; 1019 1017 int ret = 0; 1020 1018 1021 1019 DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n"); 1022 - if (info) 1023 - ret = info->suspend(info); 1024 - 1025 - /* Disable the NFC clock */ 1026 - clk_disable(nfc_clk); /* FIXME */ 1020 + if (mtd) { 1021 + ret = mtd->suspend(mtd); 1022 + /* Disable the NFC clock */ 1023 + clk_disable(host->clk); 1024 + } 1027 1025 1028 1026 return ret; 1029 1027 } 1030 1028 1031 1029 static int mxcnd_resume(struct platform_device *pdev) 1032 1030 { 1033 - struct mtd_info *info = platform_get_drvdata(pdev); 1031 + struct mtd_info *mtd = platform_get_drvdata(pdev); 1032 + struct nand_chip *nand_chip = mtd->priv; 1033 + struct mxc_nand_host *host = nand_chip->priv; 1034 1034 int ret = 0; 1035 1035 1036 1036 DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n"); 1037 - /* Enable the NFC clock */ 1038 - clk_enable(nfc_clk); /* FIXME */ 1039 1037 1040 - if (info) 1041 - info->resume(info); 1038 + if (mtd) { 1039 + /* Enable the NFC clock */ 1040 + clk_enable(host->clk); 1041 + mtd->resume(mtd); 1042 + } 1042 1043 1043 1044 return ret; 1044 1045 } ··· 1064 1055 1065 1056 static int __init mxc_nd_init(void) 1066 1057 { 1067 - /* Register the device driver structure. */ 1068 - pr_info("MXC MTD nand Driver\n"); 1069 - if (platform_driver_probe(&mxcnd_driver, mxcnd_probe) != 0) { 1070 - printk(KERN_ERR "Driver register failed for mxcnd_driver\n"); 1071 - return -ENODEV; 1072 - } 1073 - return 0; 1058 + return platform_driver_probe(&mxcnd_driver, mxcnd_probe); 1074 1059 } 1075 1060 1076 1061 static void __exit mxc_nd_cleanup(void)
-7
fs/jffs2/erase.c
··· 480 480 return; 481 481 482 482 filebad: 483 - mutex_lock(&c->erase_free_sem); 484 - spin_lock(&c->erase_completion_lock); 485 - /* Stick it on a list (any list) so erase_failed can take it 486 - right off again. Silly, but shouldn't happen often. */ 487 - list_move(&jeb->list, &c->erasing_list); 488 - spin_unlock(&c->erase_completion_lock); 489 - mutex_unlock(&c->erase_free_sem); 490 483 jffs2_erase_failed(c, jeb, bad_offset); 491 484 return; 492 485