Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57696
b: refs/heads/master
c: c3bff2e
h: refs/heads/master
v: v3
  • Loading branch information
Pierre Ossman committed Jun 13, 2007
1 parent 9109e66 commit 213434f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0107a4b32e36dccd4456e2c5e34c5cd22c94e094
refs/heads/master: c3bff2ec10b8bf2f53c954e370f9bdae93064472
15 changes: 15 additions & 0 deletions trunk/drivers/mmc/core/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,21 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
mmc_set_bus_width(host, MMC_BUS_WIDTH_4);
}

/*
* Check if read-only switch is active.
*/
if (!oldcard) {
if (!host->ops->get_ro) {
printk(KERN_WARNING "%s: host does not "
"support reading read-only "
"switch. assuming write-enable.\n",
mmc_hostname(host));
} else {
if (host->ops->get_ro(host))
mmc_card_set_readonly(card);
}
}

if (!oldcard)
host->card = card;

Expand Down

0 comments on commit 213434f

Please sign in to comment.