aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/lp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index 59eebe5a035f..2afb9038dbc5 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -128,6 +128,7 @@
128#include <linux/console.h> 128#include <linux/console.h>
129#include <linux/device.h> 129#include <linux/device.h>
130#include <linux/wait.h> 130#include <linux/wait.h>
131#include <linux/jiffies.h>
131 132
132#include <linux/parport.h> 133#include <linux/parport.h>
133#undef LP_STATS 134#undef LP_STATS
@@ -307,7 +308,7 @@ static ssize_t lp_write(struct file * file, const char __user * buf,
307 (LP_F(minor) & LP_ABORT)); 308 (LP_F(minor) & LP_ABORT));
308 309
309#ifdef LP_STATS 310#ifdef LP_STATS
310 if (jiffies-lp_table[minor].lastcall > LP_TIME(minor)) 311 if (time_after(jiffies, lp_table[minor].lastcall + LP_TIME(minor)))
311 lp_table[minor].runchars = 0; 312 lp_table[minor].runchars = 0;
312 313
313 lp_table[minor].lastcall = jiffies; 314 lp_table[minor].lastcall = jiffies;