From 8e4576296b73db008dda21baf5739ee52df6a143 Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Mon, 19 Dec 2011 16:24:19 +0100 Subject: [PATCH] --- yaml --- r: 284523 b: refs/heads/master c: aa9df4fb2adcc73d36fa41e23059519be770aaa5 h: refs/heads/master i: 284521: a18fb939849f6f449af7474a20679eb17d0ce5b8 284519: 450138b90ae74fa873f2b523b251c51d3ede6d99 v: v3 --- [refs] | 2 +- trunk/drivers/mmc/core/core.c | 6 ++++++ trunk/include/linux/mmc/host.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d4f4bff67aa7..0c862e1c6da3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7efab4f35740c63502e438886cf1e4aa3f3b800f +refs/heads/master: aa9df4fb2adcc73d36fa41e23059519be770aaa5 diff --git a/trunk/drivers/mmc/core/core.c b/trunk/drivers/mmc/core/core.c index 22050525be84..be7569f3fb56 100644 --- a/trunk/drivers/mmc/core/core.c +++ b/trunk/drivers/mmc/core/core.c @@ -2246,6 +2246,9 @@ int mmc_card_awake(struct mmc_host *host) { int err = -ENOSYS; + if (host->caps2 & MMC_CAP2_NO_SLEEP_CMD) + return 0; + mmc_bus_get(host); if (host->bus_ops && !host->bus_dead && host->bus_ops->awake) @@ -2261,6 +2264,9 @@ int mmc_card_sleep(struct mmc_host *host) { int err = -ENOSYS; + if (host->caps2 & MMC_CAP2_NO_SLEEP_CMD) + return 0; + mmc_bus_get(host); if (host->bus_ops && !host->bus_dead && host->bus_ops->sleep) diff --git a/trunk/include/linux/mmc/host.h b/trunk/include/linux/mmc/host.h index 742f0e102e1e..031d865167a2 100644 --- a/trunk/include/linux/mmc/host.h +++ b/trunk/include/linux/mmc/host.h @@ -247,6 +247,7 @@ struct mmc_host { #define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */ #define MMC_CAP2_POWEROFF_NOTIFY (1 << 2) /* Notify poweroff supported */ #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ +#define MMC_CAP2_NO_SLEEP_CMD (1 << 4) /* Don't allow sleep command */ mmc_pm_flag_t pm_caps; /* supported pm features */ unsigned int power_notify_type;