diff options
author | Christian Daudt <csd@broadcom.com> | 2013-06-20 17:26:36 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-07-05 12:59:12 -0400 |
commit | 722e1280c932dd42c474390482429ce12aff9031 (patch) | |
tree | 3f336cccb56f86153a4d1064d6273a862a999077 /drivers/mmc/host/sdhci.c | |
parent | 203bb5af65d4edaf600d75130438c0c512b05986 (diff) |
mmc: sdhci: add card_event callback to sdhci
Add a card_event callback to sdhci so that clients can provide their
own card_event to be called when card_detect is triggered.
Signed-off-by: Christian Daudt <csd@broadcom.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 3ad3973bdb33..a78bd4f3aecc 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -2062,6 +2062,10 @@ static void sdhci_card_event(struct mmc_host *mmc) | |||
2062 | struct sdhci_host *host = mmc_priv(mmc); | 2062 | struct sdhci_host *host = mmc_priv(mmc); |
2063 | unsigned long flags; | 2063 | unsigned long flags; |
2064 | 2064 | ||
2065 | /* First check if client has provided their own card event */ | ||
2066 | if (host->ops->card_event) | ||
2067 | host->ops->card_event(host); | ||
2068 | |||
2065 | spin_lock_irqsave(&host->lock, flags); | 2069 | spin_lock_irqsave(&host->lock, flags); |
2066 | 2070 | ||
2067 | /* Check host->mrq first in case we are runtime suspended */ | 2071 | /* Check host->mrq first in case we are runtime suspended */ |