aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/mxc_nand.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index b464f6b23d0d..e8dc6468f8bc 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -871,52 +871,11 @@ static int __devexit mxcnd_remove(struct platform_device *pdev)
871 return 0; 871 return 0;
872} 872}
873 873
874#ifdef CONFIG_PM
875static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
876{
877 struct mtd_info *mtd = platform_get_drvdata(pdev);
878 struct nand_chip *nand_chip = mtd->priv;
879 struct mxc_nand_host *host = nand_chip->priv;
880 int ret = 0;
881
882 DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n");
883
884 ret = mtd->suspend(mtd);
885
886 /*
887 * nand_suspend locks the device for exclusive access, so
888 * the clock must already be off.
889 */
890 BUG_ON(!ret && host->clk_act);
891
892 return ret;
893}
894
895static int mxcnd_resume(struct platform_device *pdev)
896{
897 struct mtd_info *mtd = platform_get_drvdata(pdev);
898 struct nand_chip *nand_chip = mtd->priv;
899 int ret = 0;
900
901 DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
902
903 mtd->resume(mtd);
904
905 return ret;
906}
907
908#else
909# define mxcnd_suspend NULL
910# define mxcnd_resume NULL
911#endif /* CONFIG_PM */
912
913static struct platform_driver mxcnd_driver = { 874static struct platform_driver mxcnd_driver = {
914 .driver = { 875 .driver = {
915 .name = DRIVER_NAME, 876 .name = DRIVER_NAME,
916 }, 877 },
917 .remove = __devexit_p(mxcnd_remove), 878 .remove = __devexit_p(mxcnd_remove),
918 .suspend = mxcnd_suspend,
919 .resume = mxcnd_resume,
920}; 879};
921 880
922static int __init mxc_nd_init(void) 881static int __init mxc_nd_init(void)