diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-18 06:20:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 06:20:23 -0400 |
commit | cd569ef5d6ff9f43e9504f1ffc7fdbe356518149 (patch) | |
tree | 9a4ab5e600fd09e991aa1fbb69adb1c7950898a4 /drivers/mmc/core/sd.c | |
parent | 6879827f4e08da219c99b91e4e1d793a924103e3 (diff) | |
parent | 5b664cb235e97afbf34db9c4d77f08ebd725335e (diff) |
Merge branch 'linus' into x86/urgent
Diffstat (limited to 'drivers/mmc/core/sd.c')
-rw-r--r-- | drivers/mmc/core/sd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 7ef3b15c5e3d..26fc098d77cd 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c | |||
@@ -326,7 +326,7 @@ static struct device_type sd_type = { | |||
326 | /* | 326 | /* |
327 | * Handle the detection and initialisation of a card. | 327 | * Handle the detection and initialisation of a card. |
328 | * | 328 | * |
329 | * In the case of a resume, "curcard" will contain the card | 329 | * In the case of a resume, "oldcard" will contain the card |
330 | * we're trying to reinitialise. | 330 | * we're trying to reinitialise. |
331 | */ | 331 | */ |
332 | static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, | 332 | static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, |
@@ -494,13 +494,13 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, | |||
494 | * Check if read-only switch is active. | 494 | * Check if read-only switch is active. |
495 | */ | 495 | */ |
496 | if (!oldcard) { | 496 | if (!oldcard) { |
497 | if (!host->ops->get_ro) { | 497 | if (!host->ops->get_ro || host->ops->get_ro(host) < 0) { |
498 | printk(KERN_WARNING "%s: host does not " | 498 | printk(KERN_WARNING "%s: host does not " |
499 | "support reading read-only " | 499 | "support reading read-only " |
500 | "switch. assuming write-enable.\n", | 500 | "switch. assuming write-enable.\n", |
501 | mmc_hostname(host)); | 501 | mmc_hostname(host)); |
502 | } else { | 502 | } else { |
503 | if (host->ops->get_ro(host)) | 503 | if (host->ops->get_ro(host) > 0) |
504 | mmc_card_set_readonly(card); | 504 | mmc_card_set_readonly(card); |
505 | } | 505 | } |
506 | } | 506 | } |