summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2019-05-06 15:39:37 +0300
committerRichard Weinberger <richard@nod.at>2019-07-03 00:26:57 +0300
commitfcd242c6c835dff4b5334b4db870f9fc23a8e7b7 (patch)
tree0c16a8cc8d006b45e6eba9d5cf32c084c427a793
parentbebe4681d0e7e1be2608282dc86645728bc7f623 (diff)
downloadlinux-fcd242c6c835dff4b5334b4db870f9fc23a8e7b7.tar.xz
um: fix os_timer_one_shot()
os_timer_one_shot() gets passed a value "unsigned long delta", so must not have an "int ticks" as that actually ends up being -1, and thus triggering a timer over and over again. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--arch/um/include/shared/os.h2
-rw-r--r--arch/um/os-Linux/time.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h
index ebf23012a59b..d579adcb2690 100644
--- a/arch/um/include/shared/os.h
+++ b/arch/um/include/shared/os.h
@@ -252,7 +252,7 @@ extern void os_warn(const char *fmt, ...)
extern void os_idle_sleep(unsigned long long nsecs);
extern int os_timer_create(void* timer);
extern int os_timer_set_interval(void* timer, void* its);
-extern int os_timer_one_shot(int ticks);
+extern int os_timer_one_shot(unsigned long ticks);
extern long long os_timer_disable(void);
extern long os_timer_remain(void* timer);
extern void uml_idle_timer(void);
diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c
index 0e39b9978729..b28cc35da21f 100644
--- a/arch/um/os-Linux/time.c
+++ b/arch/um/os-Linux/time.c
@@ -113,7 +113,7 @@ long os_timer_remain(void* timer)
return its.it_value.tv_nsec;
}
-int os_timer_one_shot(int ticks)
+int os_timer_one_shot(unsigned long ticks)
{
struct itimerspec its;
unsigned long long nsec;