diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-08-12 09:24:50 +0100 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2008-08-17 20:00:22 +0200 |
commit | 87dd98037d2309efbbd5e769efb23d845c37dac7 (patch) | |
tree | 25dd992c1f889c3eb276336dfbbf048f4a75d890 /drivers/mmc/host/s3cmci.c | |
parent | 5d304400a9a867a7ce545f3ae6d95d92b62570f7 (diff) | |
download | op-kernel-dev-87dd98037d2309efbbd5e769efb23d845c37dac7.zip op-kernel-dev-87dd98037d2309efbbd5e769efb23d845c37dac7.tar.gz |
s3cmci: attach get_cd host ops
Attach the routine to get_cd to allow the MMC core to find out whether
there is a card present or not without the tedious process of trying to
send commands to the card or not.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/host/s3cmci.c')
-rw-r--r-- | drivers/mmc/host/s3cmci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 6afa4c0..ae16d84 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -1004,8 +1004,9 @@ static void s3cmci_send_request(struct mmc_host *mmc) enable_irq(host->irq); } -static int s3cmci_card_present(struct s3cmci_host *host) +static int s3cmci_card_present(struct mmc_host *mmc) { + struct s3cmci_host *host = mmc_priv(mmc); struct s3c24xx_mci_pdata *pdata = host->pdata; int ret; @@ -1024,7 +1025,7 @@ static void s3cmci_request(struct mmc_host *mmc, struct mmc_request *mrq) host->cmd_is_stop = 0; host->mrq = mrq; - if (s3cmci_card_present(host) == 0) { + if (s3cmci_card_present(mmc) == 0) { dbg(host, dbg_err, "%s: no medium present\n", __func__); host->mrq->cmd->error = -ENOMEDIUM; mmc_request_done(mmc, mrq); @@ -1139,6 +1140,7 @@ static struct mmc_host_ops s3cmci_ops = { .request = s3cmci_request, .set_ios = s3cmci_set_ios, .get_ro = s3cmci_get_ro, + .get_cd = s3cmci_card_present, }; static struct s3c24xx_mci_pdata s3cmci_def_pdata = { |