提交 1a13f8fa 编写于 作者: M Matt Fleming 提交者: Linus Torvalds

mmc: remove the "state" argument to mmc_suspend_host()

Even though many mmc host drivers pass a pm_message_t argument to
mmc_suspend_host() that argument isn't used the by MMC core.  As host
drivers are converted to dev_pm_ops they'll have to construct
pm_message_t's (as they won't be passed by the PM subsystem any more) just
to appease the mmc suspend interface.

We might as well just delete the unused paramter.
Signed-off-by: NMatt Fleming <matt@console-pimps.org>
Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com>
Acked-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>ZZ
Acked-by: NSascha Sommer <saschasommer@freenet.de>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a791daa1
...@@ -1252,9 +1252,8 @@ EXPORT_SYMBOL(mmc_card_can_sleep); ...@@ -1252,9 +1252,8 @@ EXPORT_SYMBOL(mmc_card_can_sleep);
/** /**
* mmc_suspend_host - suspend a host * mmc_suspend_host - suspend a host
* @host: mmc host * @host: mmc host
* @state: suspend mode (PM_SUSPEND_xxx)
*/ */
int mmc_suspend_host(struct mmc_host *host, pm_message_t state) int mmc_suspend_host(struct mmc_host *host)
{ {
int err = 0; int err = 0;
......
...@@ -1157,7 +1157,7 @@ static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state) ...@@ -1157,7 +1157,7 @@ static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state)
enable_irq_wake(host->board->det_pin); enable_irq_wake(host->board->det_pin);
if (mmc) if (mmc)
ret = mmc_suspend_host(mmc, state); ret = mmc_suspend_host(mmc);
return ret; return ret;
} }
......
...@@ -1142,7 +1142,7 @@ static int au1xmmc_suspend(struct platform_device *pdev, pm_message_t state) ...@@ -1142,7 +1142,7 @@ static int au1xmmc_suspend(struct platform_device *pdev, pm_message_t state)
struct au1xmmc_host *host = platform_get_drvdata(pdev); struct au1xmmc_host *host = platform_get_drvdata(pdev);
int ret; int ret;
ret = mmc_suspend_host(host->mmc, state); ret = mmc_suspend_host(host->mmc);
if (ret) if (ret)
return ret; return ret;
......
...@@ -576,7 +576,7 @@ static int sdh_suspend(struct platform_device *dev, pm_message_t state) ...@@ -576,7 +576,7 @@ static int sdh_suspend(struct platform_device *dev, pm_message_t state)
int ret = 0; int ret = 0;
if (mmc) if (mmc)
ret = mmc_suspend_host(mmc, state); ret = mmc_suspend_host(mmc);
bfin_write_SDH_PWR_CTL(bfin_read_SDH_PWR_CTL() & ~PWR_ON); bfin_write_SDH_PWR_CTL(bfin_read_SDH_PWR_CTL() & ~PWR_ON);
peripheral_free_list(drv_data->pin_req); peripheral_free_list(drv_data->pin_req);
......
...@@ -675,7 +675,7 @@ static int cb710_mmc_suspend(struct platform_device *pdev, pm_message_t state) ...@@ -675,7 +675,7 @@ static int cb710_mmc_suspend(struct platform_device *pdev, pm_message_t state)
struct mmc_host *mmc = cb710_slot_to_mmc(slot); struct mmc_host *mmc = cb710_slot_to_mmc(slot);
int err; int err;
err = mmc_suspend_host(mmc, state); err = mmc_suspend_host(mmc);
if (err) if (err)
return err; return err;
......
...@@ -1337,11 +1337,10 @@ static int davinci_mmcsd_suspend(struct device *dev) ...@@ -1337,11 +1337,10 @@ static int davinci_mmcsd_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
struct mmc_davinci_host *host = platform_get_drvdata(pdev); struct mmc_davinci_host *host = platform_get_drvdata(pdev);
struct pm_message msg = { PM_EVENT_SUSPEND };
int ret; int ret;
mmc_host_enable(host->mmc); mmc_host_enable(host->mmc);
ret = mmc_suspend_host(host->mmc, msg); ret = mmc_suspend_host(host->mmc);
if (!ret) { if (!ret) {
writel(0, host->base + DAVINCI_MMCIM); writel(0, host->base + DAVINCI_MMCIM);
mmc_davinci_reset_ctrl(host, 1); mmc_davinci_reset_ctrl(host, 1);
......
...@@ -1115,7 +1115,7 @@ static int imxmci_suspend(struct platform_device *dev, pm_message_t state) ...@@ -1115,7 +1115,7 @@ static int imxmci_suspend(struct platform_device *dev, pm_message_t state)
int ret = 0; int ret = 0;
if (mmc) if (mmc)
ret = mmc_suspend_host(mmc, state); ret = mmc_suspend_host(mmc);
return ret; return ret;
} }
......
...@@ -824,7 +824,7 @@ static int mmci_suspend(struct amba_device *dev, pm_message_t state) ...@@ -824,7 +824,7 @@ static int mmci_suspend(struct amba_device *dev, pm_message_t state)
if (mmc) { if (mmc) {
struct mmci_host *host = mmc_priv(mmc); struct mmci_host *host = mmc_priv(mmc);
ret = mmc_suspend_host(mmc, state); ret = mmc_suspend_host(mmc);
if (ret == 0) if (ret == 0)
writel(0, host->base + MMCIMASK0); writel(0, host->base + MMCIMASK0);
} }
......
...@@ -1327,7 +1327,7 @@ msmsdcc_suspend(struct platform_device *dev, pm_message_t state) ...@@ -1327,7 +1327,7 @@ msmsdcc_suspend(struct platform_device *dev, pm_message_t state)
disable_irq(host->stat_irq); disable_irq(host->stat_irq);
if (mmc->card && mmc->card->type != MMC_TYPE_SDIO) if (mmc->card && mmc->card->type != MMC_TYPE_SDIO)
rc = mmc_suspend_host(mmc, state); rc = mmc_suspend_host(mmc);
if (!rc) if (!rc)
msmsdcc_writel(host, 0, MMCIMASK0); msmsdcc_writel(host, 0, MMCIMASK0);
if (host->clks_on) if (host->clks_on)
......
...@@ -865,7 +865,7 @@ static int mvsd_suspend(struct platform_device *dev, pm_message_t state) ...@@ -865,7 +865,7 @@ static int mvsd_suspend(struct platform_device *dev, pm_message_t state)
int ret = 0; int ret = 0;
if (mmc) if (mmc)
ret = mmc_suspend_host(mmc, state); ret = mmc_suspend_host(mmc);
return ret; return ret;
} }
......
...@@ -932,7 +932,7 @@ static int mxcmci_suspend(struct platform_device *dev, pm_message_t state) ...@@ -932,7 +932,7 @@ static int mxcmci_suspend(struct platform_device *dev, pm_message_t state)
int ret = 0; int ret = 0;
if (mmc) if (mmc)
ret = mmc_suspend_host(mmc, state); ret = mmc_suspend_host(mmc);
return ret; return ret;
} }
......
...@@ -1561,7 +1561,7 @@ static int mmc_omap_suspend(struct platform_device *pdev, pm_message_t mesg) ...@@ -1561,7 +1561,7 @@ static int mmc_omap_suspend(struct platform_device *pdev, pm_message_t mesg)
struct mmc_omap_slot *slot; struct mmc_omap_slot *slot;
slot = host->slots[i]; slot = host->slots[i];
ret = mmc_suspend_host(slot->mmc, mesg); ret = mmc_suspend_host(slot->mmc);
if (ret < 0) { if (ret < 0) {
while (--i >= 0) { while (--i >= 0) {
slot = host->slots[i]; slot = host->slots[i];
......
...@@ -2292,7 +2292,7 @@ static int omap_hsmmc_suspend(struct device *dev) ...@@ -2292,7 +2292,7 @@ static int omap_hsmmc_suspend(struct device *dev)
} }
cancel_work_sync(&host->mmc_carddetect_work); cancel_work_sync(&host->mmc_carddetect_work);
mmc_host_enable(host->mmc); mmc_host_enable(host->mmc);
ret = mmc_suspend_host(host->mmc, state); ret = mmc_suspend_host(host->mmc);
if (ret == 0) { if (ret == 0) {
omap_hsmmc_disable_irq(host); omap_hsmmc_disable_irq(host);
OMAP_HSMMC_WRITE(host->base, HCTL, OMAP_HSMMC_WRITE(host->base, HCTL,
......
...@@ -813,7 +813,7 @@ static int pxamci_suspend(struct device *dev) ...@@ -813,7 +813,7 @@ static int pxamci_suspend(struct device *dev)
int ret = 0; int ret = 0;
if (mmc) if (mmc)
ret = mmc_suspend_host(mmc, PMSG_SUSPEND); ret = mmc_suspend_host(mmc);
return ret; return ret;
} }
......
...@@ -1881,9 +1881,8 @@ MODULE_DEVICE_TABLE(platform, s3cmci_driver_ids); ...@@ -1881,9 +1881,8 @@ MODULE_DEVICE_TABLE(platform, s3cmci_driver_ids);
static int s3cmci_suspend(struct device *dev) static int s3cmci_suspend(struct device *dev)
{ {
struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev)); struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
struct pm_message event = { PM_EVENT_SUSPEND };
return mmc_suspend_host(mmc, event); return mmc_suspend_host(mmc);
} }
static int s3cmci_resume(struct device *dev) static int s3cmci_resume(struct device *dev)
......
...@@ -89,7 +89,7 @@ static int sdhci_of_suspend(struct of_device *ofdev, pm_message_t state) ...@@ -89,7 +89,7 @@ static int sdhci_of_suspend(struct of_device *ofdev, pm_message_t state)
{ {
struct sdhci_host *host = dev_get_drvdata(&ofdev->dev); struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
return mmc_suspend_host(host->mmc, state); return mmc_suspend_host(host->mmc);
} }
static int sdhci_of_resume(struct of_device *ofdev) static int sdhci_of_resume(struct of_device *ofdev)
......
...@@ -1597,7 +1597,7 @@ int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state) ...@@ -1597,7 +1597,7 @@ int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state)
sdhci_disable_card_detection(host); sdhci_disable_card_detection(host);
ret = mmc_suspend_host(host->mmc, state); ret = mmc_suspend_host(host->mmc);
if (ret) if (ret)
return ret; return ret;
......
...@@ -519,7 +519,7 @@ static int sdricoh_pcmcia_suspend(struct pcmcia_device *link) ...@@ -519,7 +519,7 @@ static int sdricoh_pcmcia_suspend(struct pcmcia_device *link)
{ {
struct mmc_host *mmc = link->priv; struct mmc_host *mmc = link->priv;
dev_dbg(&link->dev, "suspend\n"); dev_dbg(&link->dev, "suspend\n");
mmc_suspend_host(mmc, PMSG_SUSPEND); mmc_suspend_host(mmc);
return 0; return 0;
} }
......
...@@ -1032,7 +1032,7 @@ static void tifm_sd_remove(struct tifm_dev *sock) ...@@ -1032,7 +1032,7 @@ static void tifm_sd_remove(struct tifm_dev *sock)
static int tifm_sd_suspend(struct tifm_dev *sock, pm_message_t state) static int tifm_sd_suspend(struct tifm_dev *sock, pm_message_t state)
{ {
return mmc_suspend_host(tifm_get_drvdata(sock), state); return mmc_suspend_host(tifm_get_drvdata(sock));
} }
static int tifm_sd_resume(struct tifm_dev *sock) static int tifm_sd_resume(struct tifm_dev *sock)
......
...@@ -768,7 +768,7 @@ static int tmio_mmc_suspend(struct platform_device *dev, pm_message_t state) ...@@ -768,7 +768,7 @@ static int tmio_mmc_suspend(struct platform_device *dev, pm_message_t state)
struct mmc_host *mmc = platform_get_drvdata(dev); struct mmc_host *mmc = platform_get_drvdata(dev);
int ret; int ret;
ret = mmc_suspend_host(mmc, state); ret = mmc_suspend_host(mmc);
/* Tell MFD core it can disable us now.*/ /* Tell MFD core it can disable us now.*/
if (!ret && cell->disable) if (!ret && cell->disable)
......
...@@ -1280,7 +1280,7 @@ static int via_sd_suspend(struct pci_dev *pcidev, pm_message_t state) ...@@ -1280,7 +1280,7 @@ static int via_sd_suspend(struct pci_dev *pcidev, pm_message_t state)
via_save_pcictrlreg(host); via_save_pcictrlreg(host);
via_save_sdcreg(host); via_save_sdcreg(host);
ret = mmc_suspend_host(host->mmc, state); ret = mmc_suspend_host(host->mmc);
pci_save_state(pcidev); pci_save_state(pcidev);
pci_enable_wake(pcidev, pci_choose_state(pcidev, state), 0); pci_enable_wake(pcidev, pci_choose_state(pcidev, state), 0);
......
...@@ -1819,7 +1819,7 @@ static int wbsd_suspend(struct wbsd_host *host, pm_message_t state) ...@@ -1819,7 +1819,7 @@ static int wbsd_suspend(struct wbsd_host *host, pm_message_t state)
{ {
BUG_ON(host == NULL); BUG_ON(host == NULL);
return mmc_suspend_host(host->mmc, state); return mmc_suspend_host(host->mmc);
} }
static int wbsd_resume(struct wbsd_host *host) static int wbsd_resume(struct wbsd_host *host)
......
...@@ -230,7 +230,7 @@ static inline void *mmc_priv(struct mmc_host *host) ...@@ -230,7 +230,7 @@ static inline void *mmc_priv(struct mmc_host *host)
#define mmc_classdev(x) (&(x)->class_dev) #define mmc_classdev(x) (&(x)->class_dev)
#define mmc_hostname(x) (dev_name(&(x)->class_dev)) #define mmc_hostname(x) (dev_name(&(x)->class_dev))
extern int mmc_suspend_host(struct mmc_host *, pm_message_t); extern int mmc_suspend_host(struct mmc_host *);
extern int mmc_resume_host(struct mmc_host *); extern int mmc_resume_host(struct mmc_host *);
extern void mmc_power_save_host(struct mmc_host *host); extern void mmc_power_save_host(struct mmc_host *host);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册