]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
um: fix os_timer_one_shot()
authorJohannes Berg <johannes.berg@intel.com>
Mon, 6 May 2019 12:39:37 +0000 (14:39 +0200)
committerRichard Weinberger <richard@nod.at>
Tue, 2 Jul 2019 21:26:57 +0000 (23:26 +0200)
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>
arch/um/include/shared/os.h
arch/um/os-Linux/time.c

index ebf23012a59bbc2c019ecc3f4ffb324dccf2d92c..d579adcb26901cf1ccffc52d731405349bf5139c 100644 (file)
@@ -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);
index 0e39b9978729ff8068670ef8f7d1ee8399326067..b28cc35da21fd6dfab39ff08446eeef0141d3894 100644 (file)
@@ -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;