aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorNelson Castillo <arhuaco@freaks-unidos.net>2009-11-05 23:01:46 -0500
committerLars-Peter Clausen <lars@metafoo.de>2009-11-06 12:11:34 +0100
commit5632f33dc20fec54f329299720dab47fb20cc3e6 (patch)
tree9be44681b9d62cf4aa212c7ac2c3ae9b1bd473c9 /drivers/mfd
parente0f60a789bda9f64be701dd0169f762414011991 (diff)
Fix jiffies comparison
Jiffies can wrap. We have to use macros to compare them. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/glamo/glamo-mci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mfd/glamo/glamo-mci.c b/drivers/mfd/glamo/glamo-mci.c
index 34bdbebb9db..faeb885c553 100644
--- a/drivers/mfd/glamo/glamo-mci.c
+++ b/drivers/mfd/glamo/glamo-mci.c
@@ -238,9 +238,10 @@ static int glamo_mci_wait_idle(struct glamo_mci_host *host,
uint16_t status;
do {
status = glamo_reg_read(host, GLAMO_REG_MMC_RB_STAT1);
- } while (!(status & GLAMO_STAT1_MMC_IDLE) && jiffies < timeout);
+ } while (!(status & GLAMO_STAT1_MMC_IDLE) &&
+ time_is_after_jiffies(timeout));
- if (jiffies >= timeout) {
+ if (time_is_before_eq_jiffies(timeout)) {
glamo_mci_reset(host);
return -ETIMEDOUT;
}