-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Staging: w35und: remove timer wrappers
This patch removes the OS_TIMER and related wrappers from driver code. The patch also changes the code to use msecs_to_jiffies() for setting up timer->expires. Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- Loading branch information
Pekka Enberg
authored and
Greg Kroah-Hartman
committed
Jan 6, 2009
1 parent
a36e089
commit deee7c8
Showing
10 changed files
with
408 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,27 @@ | ||
#include "os_common.h" | ||
|
||
void vRxTimerInit(struct wb35_adapter * adapter) | ||
static void RxTimerHandler(unsigned long data) | ||
{ | ||
OS_TIMER_INITIAL(&(adapter->Mds.nTimer), (void*) RxTimerHandler, (void*) adapter); | ||
WARN_ON(1); | ||
} | ||
|
||
void vRxTimerStart(struct wb35_adapter * adapter, int timeout_value) | ||
void vRxTimerInit(struct wb35_adapter *adapter) | ||
{ | ||
if (timeout_value<MIN_TIMEOUT_VAL) | ||
timeout_value=MIN_TIMEOUT_VAL; | ||
|
||
OS_TIMER_SET( &(adapter->Mds.nTimer), timeout_value ); | ||
init_timer(&adapter->Mds.timer); | ||
adapter->Mds.timer.function = RxTimerHandler; | ||
adapter->Mds.timer.data = (unsigned long) adapter; | ||
} | ||
|
||
void vRxTimerStop(struct wb35_adapter * adapter) | ||
void vRxTimerStart(struct wb35_adapter *adapter, int timeout_value) | ||
{ | ||
OS_TIMER_CANCEL( &(adapter->Mds.nTimer), 0 ); | ||
} | ||
if (timeout_value < MIN_TIMEOUT_VAL) | ||
timeout_value = MIN_TIMEOUT_VAL; | ||
|
||
void RxTimerHandler_1a( struct wb35_adapter * adapter) | ||
{ | ||
RxTimerHandler(NULL, adapter, NULL, NULL); | ||
adapter->Mds.timer.expires = jiffies + msecs_to_jiffies(timeout_value); | ||
add_timer(&adapter->Mds.timer); | ||
} | ||
|
||
void RxTimerHandler(void* SystemSpecific1, struct wb35_adapter * adapter, | ||
void* SystemSpecific2, void* SystemSpecific3) | ||
void vRxTimerStop(struct wb35_adapter *adapter) | ||
{ | ||
WARN_ON(1); | ||
del_timer_sync(&adapter->Mds.timer); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.