]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/mmc/host/mtk-sd.c
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112...
[mirror_ubuntu-artful-kernel.git] / drivers / mmc / host / mtk-sd.c
index 10ef2ae1d2f6d80e1f563265263eb25cc7cd7ed4..8e32580c12b520017eb73af884f1b04607c3a78b 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/regulator/consumer.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/interrupt.h>
 
 #include <linux/mmc/card.h>
 #include <linux/mmc/core.h>
@@ -1074,11 +1075,8 @@ static int msdc_card_busy(struct mmc_host *mmc)
        struct msdc_host *host = mmc_priv(mmc);
        u32 status = readl(host->base + MSDC_PS);
 
-       /* check if any pin between dat[0:3] is low */
-       if (((status >> 16) & 0xf) != 0xf)
-               return 1;
-
-       return 0;
+       /* only check if data0 is low */
+       return !(status & BIT(16));
 }
 
 static void msdc_request_timeout(struct work_struct *work)