mmc: change .get_ro() callback semantics
[pandora-kernel.git] / drivers / mmc / host / imxmmc.c
index eed211b..5e880c0 100644 (file)
@@ -892,9 +892,12 @@ static int imxmci_get_ro(struct mmc_host *mmc)
        struct imxmci_host *host = mmc_priv(mmc);
 
        if (host->pdata && host->pdata->get_ro)
-               return host->pdata->get_ro(mmc_dev(mmc));
-       /* Host doesn't support read only detection so assume writeable */
-       return 0;
+               return !!host->pdata->get_ro(mmc_dev(mmc));
+       /*
+        * Board doesn't support read only detection; let the mmc core
+        * decide what to do.
+        */
+       return -ENOSYS;
 }