Skip to content

Commit

Permalink
ricoh_mmc: Use suspend_late/resume_early
Browse files Browse the repository at this point in the history
If ricoh_mmc suspends before sdhci_pci, it will pull the card
out from under the controller, which could leave the system in
a very confused state.

Using suspend_late/resume_early ensures that sdhci_pci suspends first
and resumes second.

Signed-off-by: Philip Langdale <[email protected]>
Signed-off-by: Pierre Ossman <[email protected]>
  • Loading branch information
philipl authored and Pierre Ossman committed Feb 2, 2009
1 parent cc30d60 commit 06cc1c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/mmc/host/ricoh_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static void __devexit ricoh_mmc_remove(struct pci_dev *pdev)
pci_set_drvdata(pdev, NULL);
}

static int ricoh_mmc_suspend(struct pci_dev *pdev, pm_message_t state)
static int ricoh_mmc_suspend_late(struct pci_dev *pdev, pm_message_t state)
{
struct pci_dev *fw_dev = NULL;

Expand All @@ -210,7 +210,7 @@ static int ricoh_mmc_suspend(struct pci_dev *pdev, pm_message_t state)
return 0;
}

static int ricoh_mmc_resume(struct pci_dev *pdev)
static int ricoh_mmc_resume_early(struct pci_dev *pdev)
{
struct pci_dev *fw_dev = NULL;

Expand All @@ -229,8 +229,8 @@ static struct pci_driver ricoh_mmc_driver = {
.id_table = pci_ids,
.probe = ricoh_mmc_probe,
.remove = __devexit_p(ricoh_mmc_remove),
.suspend = ricoh_mmc_suspend,
.resume = ricoh_mmc_resume,
.suspend_late = ricoh_mmc_suspend_late,
.resume_early = ricoh_mmc_resume_early,
};

/*****************************************************************************\
Expand Down

0 comments on commit 06cc1c8

Please sign in to comment.