Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ben Dooks and committed by
Pierre Ossman
87dd9803 5d304400

+4 -2
+4 -2
drivers/mmc/host/s3cmci.c
··· 1004 1004 enable_irq(host->irq); 1005 1005 } 1006 1006 1007 - static int s3cmci_card_present(struct s3cmci_host *host) 1007 + static int s3cmci_card_present(struct mmc_host *mmc) 1008 1008 { 1009 + struct s3cmci_host *host = mmc_priv(mmc); 1009 1010 struct s3c24xx_mci_pdata *pdata = host->pdata; 1010 1011 int ret; 1011 1012 ··· 1025 1024 host->cmd_is_stop = 0; 1026 1025 host->mrq = mrq; 1027 1026 1028 - if (s3cmci_card_present(host) == 0) { 1027 + if (s3cmci_card_present(mmc) == 0) { 1029 1028 dbg(host, dbg_err, "%s: no medium present\n", __func__); 1030 1029 host->mrq->cmd->error = -ENOMEDIUM; 1031 1030 mmc_request_done(mmc, mrq); ··· 1140 1139 .request = s3cmci_request, 1141 1140 .set_ios = s3cmci_set_ios, 1142 1141 .get_ro = s3cmci_get_ro, 1142 + .get_cd = s3cmci_card_present, 1143 1143 }; 1144 1144 1145 1145 static struct s3c24xx_mci_pdata s3cmci_def_pdata = {