diff options
author | 2009-07-29 15:40:57 -0700 | |
---|---|---|
committer | 2009-09-15 12:01:54 -0700 | |
commit | c8a429a465f9aaabe7fc7ddf5f34ff6dd188a68f (patch) | |
tree | 59f0837b4888425fc61063931bcf77af0f05252c /drivers/staging/hv/Channel.c | |
parent | Staging: hv: osd: add osd_ prefix to global functions (diff) | |
download | linux-dev-c8a429a465f9aaabe7fc7ddf5f34ff6dd188a68f.tar.xz linux-dev-c8a429a465f9aaabe7fc7ddf5f34ff6dd188a68f.zip |
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/Channel.c')
-rw-r--r-- | drivers/staging/hv/Channel.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index 2346b859569b..be9770e6b098 100644 --- a/drivers/staging/hv/Channel.c +++ b/drivers/staging/hv/Channel.c @@ -696,7 +696,7 @@ VmbusChannelClose( /* Stop callback and cancel the timer asap */ Channel->OnChannelCallback = NULL; - osd_TimerStop(Channel->PollTimer); + del_timer(&Channel->poll_timer); /* Send a closing message */ info = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_CLOSE_CHANNEL), GFP_KERNEL); @@ -1154,9 +1154,10 @@ VmbusChannelOnChannelEvent( DumpVmbusChannel(Channel); ASSERT(Channel->OnChannelCallback); #ifdef ENABLE_POLLING - osd_TimerStop(Channel->PollTimer); + del_timer(&Channel->poll_timer); Channel->OnChannelCallback(Channel->ChannelCallbackContext); - osd_TimerStart(Channel->PollTimer, 100 /* 100us */); + channel->poll_timer.expires(jiffies + usecs_to_jiffies(100); + add_timer(&channel->poll_timer); #else Channel->OnChannelCallback(Channel->ChannelCallbackContext); #endif @@ -1171,18 +1172,16 @@ Description: Timer event callback --*/ -static void -VmbusChannelOnTimer( - void *Context - ) +static void VmbusChannelOnTimer(unsigned long data) { - VMBUS_CHANNEL *channel = (VMBUS_CHANNEL*)Context; + VMBUS_CHANNEL *channel = (VMBUS_CHANNEL*)data; if (channel->OnChannelCallback) { channel->OnChannelCallback(channel->ChannelCallbackContext); #ifdef ENABLE_POLLING - osd_TimerStart(channel->PollTimer, 100 /* 100us */); + channel->poll_timer.expires(jiffies + usecs_to_jiffies(100); + add_timer(&channel->poll_timer); #endif } } |