aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/au1xmmc.c
diff options
context:
space:
mode:
authorManuel Lauss <mano@roarinelk.homelinux.net>2007-01-25 04:29:24 -0500
committerPierre Ossman <drzeus@drzeus.cx>2007-02-04 14:54:05 -0500
commit82999770d6926193f50b42e713a92ee4028398e3 (patch)
tree84860892e09d3be93d766da11b4b4e9748e4929c /drivers/mmc/au1xmmc.c
parent62d0cfcb27cf755cebdc93ca95dabc83608007cd (diff)
mmc: au1xmmc: implement proper ro switch detection
au1xmmc: implement proper R/O switch detection. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/au1xmmc.c')
-rw-r--r--drivers/mmc/au1xmmc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c
index 800527cf40d5..212e41f78df4 100644
--- a/drivers/mmc/au1xmmc.c
+++ b/drivers/mmc/au1xmmc.c
@@ -152,8 +152,9 @@ static inline int au1xmmc_card_inserted(struct au1xmmc_host *host)
152 ? 1 : 0; 152 ? 1 : 0;
153} 153}
154 154
155static inline int au1xmmc_card_readonly(struct au1xmmc_host *host) 155static int au1xmmc_card_readonly(struct mmc_host *mmc)
156{ 156{
157 struct au1xmmc_host *host = mmc_priv(mmc);
157 return (bcsr->status & au1xmmc_card_table[host->id].wpstatus) 158 return (bcsr->status & au1xmmc_card_table[host->id].wpstatus)
158 ? 1 : 0; 159 ? 1 : 0;
159} 160}
@@ -878,6 +879,7 @@ static void au1xmmc_init_dma(struct au1xmmc_host *host)
878static const struct mmc_host_ops au1xmmc_ops = { 879static const struct mmc_host_ops au1xmmc_ops = {
879 .request = au1xmmc_request, 880 .request = au1xmmc_request,
880 .set_ios = au1xmmc_set_ios, 881 .set_ios = au1xmmc_set_ios,
882 .get_ro = au1xmmc_card_readonly,
881}; 883};
882 884
883static int __devinit au1xmmc_probe(struct platform_device *pdev) 885static int __devinit au1xmmc_probe(struct platform_device *pdev)