]> git.baikalelectronics.ru Git - kernel.git/commit
alarmtimer: Return correct remaining time
authorAndrei Vagin <avagin@gmail.com>
Mon, 8 Apr 2019 04:15:42 +0000 (21:15 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 10 Apr 2019 13:23:26 +0000 (15:23 +0200)
commite3008f33d44977bc705529840d97f69d6d626233
treedd505b68149ade6a64d4cce596329209b8cbbc24
parent2763d79a192dfe0d00549ee418c38de14f1ca530
alarmtimer: Return correct remaining time

To calculate a remaining time, it's required to subtract the current time
from the expiration time. In alarm_timer_remaining() the arguments of
ktime_sub are swapped.

Fixes: fd5f8ba9cf4a ("alarmtimer: Implement remaining callback")
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20190408041542.26338-1-avagin@gmail.com
kernel/time/alarmtimer.c