msm: sdio: fix a bug in sdio_close() in case of jiffies wraparound
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
diff --git a/arch/arm/mach-msm/sdio_al.c b/arch/arm/mach-msm/sdio_al.c
index 5cbf013..25baedb 100644
--- a/arch/arm/mach-msm/sdio_al.c
+++ b/arch/arm/mach-msm/sdio_al.c
@@ -2656,10 +2656,11 @@
__func__, ret, ch->name);
return ret;
}
- if (jiffies > flush_expires) {
+
+ if (time_after(jiffies, flush_expires) != 0) {
pr_err(MODULE_NAME ":%s flush rx packets"
- " timeout: ch %s\n",
- __func__, ch->name);
+ " timeout: ch %s\n",
+ __func__, ch->name);
sdio_al_get_into_err_state(sdio_al_dev);
return -EBUSY;
}