aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/winbond/linux/wb35rx.c
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2008-10-29 14:10:32 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 16:51:45 -0500
commit44e8541c5e14b40a773e830df339eddbcd0cb7ec (patch)
treed943f74f6585b3755ee35ce1b6ea5e289c29d6d0 /drivers/staging/winbond/linux/wb35rx.c
parentdeee7c8164e62690aefefb3503bc4c4672b3e020 (diff)
Staging: w35und: remove atomic op wrappers
Use the kernel provided atomic op functions and remove the OS_ATOMIC and related wrapper macros. 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>
Diffstat (limited to 'drivers/staging/winbond/linux/wb35rx.c')
-rw-r--r--drivers/staging/winbond/linux/wb35rx.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/winbond/linux/wb35rx.c b/drivers/staging/winbond/linux/wb35rx.c
index e492fa581a4..f690298dea2 100644
--- a/drivers/staging/winbond/linux/wb35rx.c
+++ b/drivers/staging/winbond/linux/wb35rx.c
@@ -10,17 +10,16 @@
10//============================================================================ 10//============================================================================
11#include "sysdef.h" 11#include "sysdef.h"
12 12
13
14void Wb35Rx_start(phw_data_t pHwData) 13void Wb35Rx_start(phw_data_t pHwData)
15{ 14{
16 PWB35RX pWb35Rx = &pHwData->Wb35Rx; 15 PWB35RX pWb35Rx = &pHwData->Wb35Rx;
17 16
18 // Allow only one thread to run into the Wb35Rx() function 17 // Allow only one thread to run into the Wb35Rx() function
19 if (OS_ATOMIC_INC(pHwData->adapter, &pWb35Rx->RxFireCounter) == 1) { 18 if (atomic_inc_return(&pWb35Rx->RxFireCounter) == 1) {
20 pWb35Rx->EP3vm_state = VM_RUNNING; 19 pWb35Rx->EP3vm_state = VM_RUNNING;
21 Wb35Rx(pHwData); 20 Wb35Rx(pHwData);
22 } else 21 } else
23 OS_ATOMIC_DEC(pHwData->adapter, &pWb35Rx->RxFireCounter); 22 atomic_dec(&pWb35Rx->RxFireCounter);
24} 23}
25 24
26// This function cannot reentrain 25// This function cannot reentrain
@@ -82,7 +81,7 @@ void Wb35Rx( phw_data_t pHwData )
82error: 81error:
83 // VM stop 82 // VM stop
84 pWb35Rx->EP3vm_state = VM_STOP; 83 pWb35Rx->EP3vm_state = VM_STOP;
85 OS_ATOMIC_DEC( pHwData->adapter, &pWb35Rx->RxFireCounter ); 84 atomic_dec(&pWb35Rx->RxFireCounter);
86} 85}
87 86
88void Wb35Rx_Complete(struct urb *urb) 87void Wb35Rx_Complete(struct urb *urb)
@@ -157,7 +156,7 @@ void Wb35Rx_Complete(struct urb *urb)
157 156
158error: 157error:
159 pWb35Rx->RxOwner[ RxBufferId ] = 1; // Set the owner to hardware 158 pWb35Rx->RxOwner[ RxBufferId ] = 1; // Set the owner to hardware
160 OS_ATOMIC_DEC( pHwData->adapter, &pWb35Rx->RxFireCounter ); 159 atomic_dec(&pWb35Rx->RxFireCounter);
161 pWb35Rx->EP3vm_state = VM_STOP; 160 pWb35Rx->EP3vm_state = VM_STOP;
162} 161}
163 162