summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/sdio.c
diff options
context:
space:
mode:
authorRui Miguel Silva <rui.silva@linaro.org>2015-07-02 19:11:32 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2015-07-06 11:15:42 -0700
commit08ccc9be680debdeb9eb2dcaa83c5fc7cd71f487 (patch)
tree740c430036156ae562ae52a35fff3d710e2d3011 /drivers/staging/greybus/sdio.c
parentc36d31cbc57635f7e66176d84d7b8688796a01d3 (diff)
greybus: sdio: fix return of get_cd and get_ro
Functions were returning the wrong flag for the expected value. Swap them. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/sdio.c')
-rw-r--r--drivers/staging/greybus/sdio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/greybus/sdio.c b/drivers/staging/greybus/sdio.c
index 53cb46f6f7c8..f6adf0908d2e 100644
--- a/drivers/staging/greybus/sdio.c
+++ b/drivers/staging/greybus/sdio.c
@@ -635,7 +635,7 @@ static int gb_mmc_get_ro(struct mmc_host *mmc)
if (host->removed)
return -ESHUTDOWN;
mutex_unlock(&host->lock);
- return host->card_present;
+ return host->read_only;
}
static int gb_mmc_get_cd(struct mmc_host *mmc)
@@ -646,7 +646,7 @@ static int gb_mmc_get_cd(struct mmc_host *mmc)
if (host->removed)
return -ESHUTDOWN;
mutex_unlock(&host->lock);
- return host->read_only;
+ return host->card_present;
}
static const struct mmc_host_ops gb_sdio_ops = {