summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMichalis Pappas <mpappas@fastmail.fm>2014-05-09 18:08:21 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-16 12:12:51 -0700
commit917ab47f5a25d636a88a06cdc0ca0432a59b6968 (patch)
tree36e49e7cb2ef77b3abfc1703ef6f469206732462 /drivers
parentd0a3956fefcb8aec21845a8ae8b927415a3edf41 (diff)
staging: gdm72xx: Replace comparisons on jiffies values with wrap-safe functions
Fixes the following checkpatch.pl issue: WARNING: Comparing jiffies is almost always wrong; prefer time_after, time_before and friends Signed-off-by: Michalis Pappas <mpappas@fastmail.fm> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/gdm72xx/gdm_usb.c2
-rw-r--r--drivers/staging/gdm72xx/sdio_boot.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/gdm72xx/gdm_usb.c b/drivers/staging/gdm72xx/gdm_usb.c
index 20539d809397..9ddf8f58d87b 100644
--- a/drivers/staging/gdm72xx/gdm_usb.c
+++ b/drivers/staging/gdm72xx/gdm_usb.c
@@ -730,7 +730,7 @@ static int k_mode_thread(void *arg)
spin_unlock_irqrestore(&k_lock, flags2);
expire = jiffies + K_WAIT_TIME;
- while (jiffies < expire)
+ while (time_before(jiffies, expire))
schedule_timeout(K_WAIT_TIME);
spin_lock_irqsave(&rx->lock, flags);
diff --git a/drivers/staging/gdm72xx/sdio_boot.c b/drivers/staging/gdm72xx/sdio_boot.c
index cbe5dcfc2ac9..2c02842ac5da 100644
--- a/drivers/staging/gdm72xx/sdio_boot.c
+++ b/drivers/staging/gdm72xx/sdio_boot.c
@@ -41,11 +41,11 @@ static u8 *tx_buf;
static int ack_ready(struct sdio_func *func)
{
- unsigned long start = jiffies;
+ unsigned long wait = jiffies + HZ;
u8 val;
int ret;
- while ((jiffies - start) < HZ) {
+ while (time_before(jiffies, wait)) {
val = sdio_readb(func, 0x13, &ret);
if (val & 0x01)
return 1;