diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/sd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 41bfb5dfe6ff..918477c490b0 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c | |||
@@ -427,6 +427,21 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, | |||
427 | mmc_set_bus_width(host, MMC_BUS_WIDTH_4); | 427 | mmc_set_bus_width(host, MMC_BUS_WIDTH_4); |
428 | } | 428 | } |
429 | 429 | ||
430 | /* | ||
431 | * Check if read-only switch is active. | ||
432 | */ | ||
433 | if (!oldcard) { | ||
434 | if (!host->ops->get_ro) { | ||
435 | printk(KERN_WARNING "%s: host does not " | ||
436 | "support reading read-only " | ||
437 | "switch. assuming write-enable.\n", | ||
438 | mmc_hostname(host)); | ||
439 | } else { | ||
440 | if (host->ops->get_ro(host)) | ||
441 | mmc_card_set_readonly(card); | ||
442 | } | ||
443 | } | ||
444 | |||
430 | if (!oldcard) | 445 | if (!oldcard) |
431 | host->card = card; | 446 | host->card = card; |
432 | 447 | ||