]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
greybus: sdio: fix return of get_cd and get_ro
authorRui Miguel Silva <rui.silva@linaro.org>
Thu, 2 Jul 2015 18:11:32 +0000 (19:11 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 6 Jul 2015 18:15:42 +0000 (11:15 -0700)
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>
drivers/staging/greybus/sdio.c

index 53cb46f6f7c88f11c8513ef129b23394e256f814..f6adf0908d2e01f5154a715225ad5472389b0241 100644 (file)
@@ -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 = {