Skip to content

Commit

Permalink
mmc: au1xmmc: implement proper ro switch detection
Browse files Browse the repository at this point in the history
au1xmmc: implement proper R/O switch detection.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
  • Loading branch information
Manuel Lauss authored and Pierre Ossman committed Feb 4, 2007
1 parent 62d0cfc commit 8299977
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/mmc/au1xmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ static inline int au1xmmc_card_inserted(struct au1xmmc_host *host)
? 1 : 0;
}

static inline int au1xmmc_card_readonly(struct au1xmmc_host *host)
static int au1xmmc_card_readonly(struct mmc_host *mmc)
{
struct au1xmmc_host *host = mmc_priv(mmc);
return (bcsr->status & au1xmmc_card_table[host->id].wpstatus)
? 1 : 0;
}
Expand Down Expand Up @@ -878,6 +879,7 @@ static void au1xmmc_init_dma(struct au1xmmc_host *host)
static const struct mmc_host_ops au1xmmc_ops = {
.request = au1xmmc_request,
.set_ios = au1xmmc_set_ios,
.get_ro = au1xmmc_card_readonly,
};

static int __devinit au1xmmc_probe(struct platform_device *pdev)
Expand Down

0 comments on commit 8299977

Please sign in to comment.