diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-29 22:40:57 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 19:01:54 (GMT) |
commit | c8a429a465f9aaabe7fc7ddf5f34ff6dd188a68f (patch) | |
tree | 59f0837b4888425fc61063931bcf77af0f05252c /drivers/staging/hv/Channel.c | |
parent | bfc30aae73b6be57528059a9e03ce8674320e67b (diff) | |
download | linux-fsl-qoriq-c8a429a465f9aaabe7fc7ddf5f34ff6dd188a68f.tar.xz |
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 2346b85..be9770e 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 } } |