Commit fcd242c6c835dff4b5334b4db870f9fc23a8e7b7

Authored by Johannes Berg
Committed by Richard Weinberger
1 parent bebe4681d0

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>

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

arch/um/include/shared/os.h
... ... @@ -252,7 +252,7 @@
252 252 extern void os_idle_sleep(unsigned long long nsecs);
253 253 extern int os_timer_create(void* timer);
254 254 extern int os_timer_set_interval(void* timer, void* its);
255   -extern int os_timer_one_shot(int ticks);
  255 +extern int os_timer_one_shot(unsigned long ticks);
256 256 extern long long os_timer_disable(void);
257 257 extern long os_timer_remain(void* timer);
258 258 extern void uml_idle_timer(void);
arch/um/os-Linux/time.c
... ... @@ -113,7 +113,7 @@
113 113 return its.it_value.tv_nsec;
114 114 }
115 115  
116   -int os_timer_one_shot(int ticks)
  116 +int os_timer_one_shot(unsigned long ticks)
117 117 {
118 118 struct itimerspec its;
119 119 unsigned long long nsec;