From: 黄涛 Date: Mon, 1 Aug 2011 03:25:07 +0000 (+0800) Subject: mmc: rk29: fix for v2.6.36 X-Git-Tag: firefly_0821_release~9798 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=791121e111108c103b276023efdbb61d6d7b2924;p=firefly-linux-kernel-4.4.55.git mmc: rk29: fix for v2.6.36 --- diff --git a/drivers/mmc/host/rk29_sdmmc.c b/drivers/mmc/host/rk29_sdmmc.c index 9057703bb011..72cf1c428f9a 100644 --- a/drivers/mmc/host/rk29_sdmmc.c +++ b/drivers/mmc/host/rk29_sdmmc.c @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include #include #include @@ -2755,6 +2757,7 @@ static int rk29_sdmmc_probe(struct platform_device *pdev) } mmc->ops = &rk29_sdmmc_ops[pdev->id]; + mmc->pm_flags |= MMC_PM_IGNORE_PM_NOTIFY; mmc->f_min = FOD_FREQ; #if 0 mmc->f_max = SDHC_FPP_FREQ; @@ -3020,7 +3023,11 @@ static int rk29_sdmmc_suspend(struct platform_device *pdev, pm_message_t state) if(host && host->pdev && (RK29_CTRL_SDMMC_ID == host->pdev->id)) //only the SDMMC0 have suspend-resume; noted by xbw { if (mmc) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)) + ret = mmc_suspend_host(mmc); +#else ret = mmc_suspend_host(mmc, state); +#endif if(rk29_sdmmc_sdcard_suspend(host) < 0) dev_info(&host->pdev->dev, "rk29_sdmmc_sdcard_suspend error\n"); @@ -3060,12 +3067,12 @@ static struct platform_driver rk29_sdmmc_driver = { }, }; -static int __init rk29_sdmmc_init(void) +static int __devinit rk29_sdmmc_init(void) { return platform_driver_probe(&rk29_sdmmc_driver, rk29_sdmmc_probe); } -static void __exit rk29_sdmmc_exit(void) +static void __devexit rk29_sdmmc_exit(void) { platform_driver_unregister(&rk29_sdmmc_driver); }