diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-29 15:40:57 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:01:54 -0700 |
commit | c8a429a465f9aaabe7fc7ddf5f34ff6dd188a68f (patch) | |
tree | 59f0837b4888425fc61063931bcf77af0f05252c /drivers/staging/hv/osd.c | |
parent | bfc30aae73b6be57528059a9e03ce8674320e67b (diff) | |
download | op-kernel-dev-c8a429a465f9aaabe7fc7ddf5f34ff6dd188a68f.zip op-kernel-dev-c8a429a465f9aaabe7fc7ddf5f34ff6dd188a68f.tar.gz |
Staging: hv: remove timer wrapper functions
Use a real timer (there's only one in the code), no wrapper is needed,
it just increases the complexity for no reason.
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/osd.c')
-rw-r--r-- | drivers/staging/hv/osd.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index c2d3094..d39e7a0 100644 --- a/drivers/staging/hv/osd.c +++ b/drivers/staging/hv/osd.c @@ -34,7 +34,6 @@ #include <linux/spinlock.h> #include <linux/workqueue.h> #include <linux/kernel.h> -#include <linux/timer.h> #include <linux/jiffies.h> #include <linux/delay.h> #include <linux/time.h> @@ -88,48 +87,6 @@ void osd_PageFree(void* page, unsigned int count) __free_page(p);*/ } -static void TimerCallback(unsigned long data) -{ - struct osd_timer *t = (struct osd_timer *) data; - - t->callback(t->context); -} - -struct osd_timer *osd_TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context) -{ - struct osd_timer *t = kmalloc(sizeof(struct osd_timer), GFP_KERNEL); - if (!t) - { - return NULL; - } - - t->callback = pfnTimerCB; - t->context = context; - - init_timer(&t->timer); - t->timer.data = (unsigned long)t; - t->timer.function = TimerCallback; - - return t; -} - -void osd_TimerStart(struct osd_timer *t, u32 expirationInUs) -{ - t->timer.expires = jiffies + usecs_to_jiffies(expirationInUs); - add_timer(&t->timer); -} - -int osd_TimerStop(struct osd_timer *t) -{ - return del_timer(&t->timer); -} - -void osd_TimerClose(struct osd_timer *t) -{ - del_timer(&t->timer); - kfree(t); -} - struct osd_waitevent *osd_WaitEventCreate(void) { struct osd_waitevent *wait = kmalloc(sizeof(struct osd_waitevent), GFP_KERNEL); |