Commit graph

4 commits

Author SHA1 Message Date
WEN Pingbo 59d805af41 Input: hil_mlc - convert timeval to jiffies
struct timeval is not y2038 safe, and what mlc->instart do is
scheduling a task in a fixed timeout, so jiffies is the
simplest choice here.

In hilse_donode(), the expires in mod_timer equals

	jiffies + intimeout - (now - instart)

If we use jiffies in 'now', the expires equals

	instart + intimeout

So, all we need to do is that making sure expires is a future
timestamp before passed it to mod_timer.

[arnd: slightly simplified patch further]

Link: https://lists.linaro.org/pipermail/y2038/2015-October/000937.html
Signed-off-by: WEN Pingbo <pingbo.wen@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Patchwork-Id: 10076615
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-01 21:39:12 -08:00
WEN Pingbo ac45e6293f Input: hil_mlc - convert timeval to time64_t
Since mlc->lcv_t is only interested in seconds, directly using time64_t
here.

This gets rid of the deprecated do_gettimeofday() and avoids problems
with time going backwards since we now use the monotonic clocksource.

Signed-off-by: WEN Pingbo <pingbo.wen@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Patchwork-Id: 10076611
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-01 21:39:12 -08:00
Matthew Wilcox 6188e10d38 Convert asm/semaphore.h users to linux/semaphore.h
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
2008-04-18 22:22:54 -04:00
Matthew Wilcox 6ab0f5cd36 [PARISC] Update parisc specific input code from parisc tree
Update drivers to new input layer changes.

Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>

Reorder code in gscps2_interrupt() and only enable ports when opened.
This fixes issues with hangs booting an SMP kernel on my C360.
Previously serio_interrupt() could be called before the lock in
struct serio was initialised.

Signed-off-by: Richard Hirst <rhirst@parisc-linux.org>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-10-21 22:58:51 -04:00