From: Marcelo Feitoza Parisi Subject: [KJ] [PATCH] drivers/ieee1394/hosts.c : Use of time_before macro Use of time_before() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read. Signed-off-by: Marcelo Feitoza Parisi --- hosts.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: quilt/drivers/ieee1394/hosts.c =================================================================== --- quilt.orig/drivers/ieee1394/hosts.c +++ quilt/drivers/ieee1394/hosts.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "csr1212.h" #include "ieee1394.h" @@ -217,7 +218,7 @@ int hpsb_update_config_rom_image(struct /* IEEE 1394a-2000 prohibits using the same generation number * twice in a 60 second period. */ - if (jiffies - host->csr.gen_timestamp[next_gen] < 60 * HZ) + if (time_before(jiffies, host->csr.gen_timestamp[next_gen] + 60 * HZ)) /* Wait 60 seconds from the last time this generation number was * used. */ reset_delay = (60 * HZ) + host->csr.gen_timestamp[next_gen] - jiffies;