Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 126558
b: refs/heads/master
c: c8b2b70
h: refs/heads/master
v: v3
  • Loading branch information
Pekka Enberg authored and Greg Kroah-Hartman committed Jan 6, 2009
1 parent 1e481f7 commit 685e1fc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 279b6ccc002f87e1c127f372f73c95d026fd1803
refs/heads/master: c8b2b70b4334acbbc4daa445aa21b1fe6d337ac3
1 change: 0 additions & 1 deletion trunk/drivers/staging/winbond/adapter.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define OS_MEMORY_ALLOC( _V, _S ) WBLINUX_MemoryAlloc( _V, _S )
#define OS_LINK_STATUS (adapter->LinkStatus == OS_CONNECTED)
#define OS_SET_SHUTDOWN( _A ) _A->shutdown=1
#define OS_SET_RESUME( _A ) _A->shutdown=0
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/winbond/linux/wb35reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Wb35Reg_BurstWrite(phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterData, u8 N

// Trying to use burst write function if use new hardware
UrbSize = sizeof(struct wb35_reg_queue) + DataSize + sizeof(struct usb_ctrlrequest);
OS_MEMORY_ALLOC( (void* *)&reg_queue, UrbSize );
reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
urb = usb_alloc_urb(0, GFP_ATOMIC);
if( urb && reg_queue ) {
reg_queue->DIRECT = 2;// burst write register
Expand Down Expand Up @@ -174,7 +174,7 @@ Wb35Reg_Write( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue )

// update the register by send urb request------------------------------------
UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
OS_MEMORY_ALLOC( (void* *)&reg_queue, UrbSize );
reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
urb = usb_alloc_urb(0, GFP_ATOMIC);
if (urb && reg_queue) {
reg_queue->DIRECT = 1;// burst write register
Expand Down Expand Up @@ -234,7 +234,7 @@ Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, u16 RegisterNo, u32 Register

// update the register by send urb request------------------------------------
UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
OS_MEMORY_ALLOC((void* *) &reg_queue, UrbSize );
reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
urb = usb_alloc_urb(0, GFP_ATOMIC);
if (urb && reg_queue) {
reg_queue->DIRECT = 1;// burst write register
Expand Down Expand Up @@ -341,7 +341,7 @@ Wb35Reg_Read(phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue )

// update the variable by send Urb to read register ------------------------------------
UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
OS_MEMORY_ALLOC( (void* *)&reg_queue, UrbSize );
reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
urb = usb_alloc_urb(0, GFP_ATOMIC);
if( urb && reg_queue )
{
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/staging/winbond/linux/wb35rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ void Wb35Rx( phw_data_t pHwData )

pWb35Rx->CurrentRxBufferId = RxBufferId;

if (1 != OS_MEMORY_ALLOC((void* *)&pWb35Rx->pDRx, MAX_USB_RX_BUFFER)) {
pWb35Rx->pDRx = kzalloc(MAX_USB_RX_BUFFER, GFP_ATOMIC);
if (!pWb35Rx->pDRx) {
printk("w35und: Rx memory alloc failed\n");
goto error;
}
Expand Down
10 changes: 0 additions & 10 deletions trunk/drivers/staging/winbond/wblinux.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@
//============================================================================
#include "os_common.h"

u32
WBLINUX_MemoryAlloc(void* *VirtualAddress, u32 Length)
{
*VirtualAddress = kzalloc( Length, GFP_ATOMIC ); //GFP_KERNEL is not suitable

if (*VirtualAddress == NULL)
return 0;
return 1;
}

s32
EncapAtomicInc(struct wb35_adapter * adapter, void* pAtomic)
{
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/winbond/wblinux_f.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//
// wblinux_f.h
//
u32 WBLINUX_MemoryAlloc( void* *VirtualAddress, u32 Length );
s32 EncapAtomicInc( struct wb35_adapter *adapter, void* pAtomic );
s32 EncapAtomicDec( struct wb35_adapter *adapter, void* pAtomic );
void WBLinux_ReceivePacket( struct wb35_adapter *adapter, PRXLAYER1 pRxLayer1 );
Expand Down

0 comments on commit 685e1fc

Please sign in to comment.