drivers/atm/iphase.c : Use of the time_after() macro
Subsystems (2)
PATCH 1/1 drivers/atm/iphase.c : Use of the time_after() macro
Use of the time_after() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read.
Signed-off-by Marcelo Feitoza Parisi <[email protected]>
drivers/atm/iphase.c +4 -2
@@ -60,7 +60,8 @@#include <asm/uaccess.h> #include <asm/string.h> #include <asm/byteorder.h> -#include <linux/vmalloc.h> +#include <linux/vmalloc.h> +#include <linux/jiffies.h> #include "iphase.h" #include "suni.h" #define swap (x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8))
@@ -189,7 +190,8 @@int ltimeout;ia_hack_tcq (dev); -if (((jiffies - timer)>50 )||((dev->ffL.tcq_rd==dev->host_tcq_wr))){ +if (time_after (jiffies, timer +50 ) + ||((dev->ffL.tcq_rd==dev->host_tcq_wr))){ timer = jiffies; i=0 ;while (i < dev->num_tx_desc) {
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors