Commit 81416446 authored by Harsh Kumar's avatar Harsh Kumar Committed by Greg Kroah-Hartman

Staging: winbond: Removed undesired spaces, lines and tabs

checkpatch cleanup: Removed some undesired spaces, lines and tabs to comply with coding style.
Signed-off-by: default avatarHarsh Kumar <harsh1kumar@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 907af425
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "mds_f.h" #include "mds_f.h"
unsigned char unsigned char
Wb35Tx_get_tx_buffer(struct hw_data * pHwData, u8 **pBuffer) Wb35Tx_get_tx_buffer(struct hw_data *pHwData, u8 **pBuffer)
{ {
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
...@@ -25,10 +25,10 @@ Wb35Tx_get_tx_buffer(struct hw_data * pHwData, u8 **pBuffer) ...@@ -25,10 +25,10 @@ Wb35Tx_get_tx_buffer(struct hw_data * pHwData, u8 **pBuffer)
static void Wb35Tx(struct wbsoft_priv *adapter); static void Wb35Tx(struct wbsoft_priv *adapter);
static void Wb35Tx_complete(struct urb * pUrb) static void Wb35Tx_complete(struct urb *pUrb)
{ {
struct wbsoft_priv *adapter = pUrb->context; struct wbsoft_priv *adapter = pUrb->context;
struct hw_data * pHwData = &adapter->sHwData; struct hw_data *pHwData = &adapter->sHwData;
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
struct wb35_mds *pMds = &adapter->Mds; struct wb35_mds *pMds = &adapter->Mds;
...@@ -37,7 +37,7 @@ static void Wb35Tx_complete(struct urb * pUrb) ...@@ -37,7 +37,7 @@ static void Wb35Tx_complete(struct urb * pUrb)
pWb35Tx->EP4vm_state = VM_COMPLETED; pWb35Tx->EP4vm_state = VM_COMPLETED;
pWb35Tx->EP4VM_status = pUrb->status; /* Store the last result of Irp */ pWb35Tx->EP4VM_status = pUrb->status; /* Store the last result of Irp */
/* Set the owner. Free the owner bit always. */ /* Set the owner. Free the owner bit always. */
pMds->TxOwner[ pWb35Tx->TxSendIndex ] = 0; pMds->TxOwner[pWb35Tx->TxSendIndex] = 0;
pWb35Tx->TxSendIndex++; pWb35Tx->TxSendIndex++;
pWb35Tx->TxSendIndex %= MAX_USB_TX_BUFFER_NUMBER; pWb35Tx->TxSendIndex %= MAX_USB_TX_BUFFER_NUMBER;
...@@ -65,15 +65,14 @@ static void Wb35Tx_complete(struct urb * pUrb) ...@@ -65,15 +65,14 @@ static void Wb35Tx_complete(struct urb * pUrb)
static void Wb35Tx(struct wbsoft_priv *adapter) static void Wb35Tx(struct wbsoft_priv *adapter)
{ {
struct hw_data * pHwData = &adapter->sHwData; struct hw_data *pHwData = &adapter->sHwData;
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
u8 *pTxBufferAddress; u8 *pTxBufferAddress;
struct wb35_mds *pMds = &adapter->Mds; struct wb35_mds *pMds = &adapter->Mds;
struct urb * pUrb = (struct urb *)pWb35Tx->Tx4Urb; struct urb *pUrb = (struct urb *)pWb35Tx->Tx4Urb;
int retv; int retv;
u32 SendIndex; u32 SendIndex;
if (pHwData->SurpriseRemove) if (pHwData->SurpriseRemove)
goto cleanup; goto cleanup;
...@@ -91,12 +90,12 @@ static void Wb35Tx(struct wbsoft_priv *adapter) ...@@ -91,12 +90,12 @@ static void Wb35Tx(struct wbsoft_priv *adapter)
/* Issuing URB */ /* Issuing URB */
usb_fill_bulk_urb(pUrb, pHwData->udev, usb_fill_bulk_urb(pUrb, pHwData->udev,
usb_sndbulkpipe(pHwData->udev, 4), usb_sndbulkpipe(pHwData->udev, 4),
pTxBufferAddress, pMds->TxBufferSize[ SendIndex ], pTxBufferAddress, pMds->TxBufferSize[SendIndex],
Wb35Tx_complete, adapter); Wb35Tx_complete, adapter);
pWb35Tx->EP4vm_state = VM_RUNNING; pWb35Tx->EP4vm_state = VM_RUNNING;
retv = usb_submit_urb(pUrb, GFP_ATOMIC); retv = usb_submit_urb(pUrb, GFP_ATOMIC);
if (retv<0) { if (retv < 0) {
printk("EP4 Tx Irp sending error\n"); printk("EP4 Tx Irp sending error\n");
goto cleanup; goto cleanup;
} }
...@@ -116,7 +115,7 @@ static void Wb35Tx(struct wbsoft_priv *adapter) ...@@ -116,7 +115,7 @@ static void Wb35Tx(struct wbsoft_priv *adapter)
void Wb35Tx_start(struct wbsoft_priv *adapter) void Wb35Tx_start(struct wbsoft_priv *adapter)
{ {
struct hw_data * pHwData = &adapter->sHwData; struct hw_data *pHwData = &adapter->sHwData;
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
/* Allow only one thread to run into function */ /* Allow only one thread to run into function */
...@@ -127,7 +126,7 @@ void Wb35Tx_start(struct wbsoft_priv *adapter) ...@@ -127,7 +126,7 @@ void Wb35Tx_start(struct wbsoft_priv *adapter)
atomic_dec(&pWb35Tx->TxFireCounter); atomic_dec(&pWb35Tx->TxFireCounter);
} }
unsigned char Wb35Tx_initial(struct hw_data * pHwData) unsigned char Wb35Tx_initial(struct hw_data *pHwData)
{ {
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
...@@ -138,52 +137,52 @@ unsigned char Wb35Tx_initial(struct hw_data * pHwData) ...@@ -138,52 +137,52 @@ unsigned char Wb35Tx_initial(struct hw_data * pHwData)
pWb35Tx->Tx2Urb = usb_alloc_urb(0, GFP_ATOMIC); pWb35Tx->Tx2Urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!pWb35Tx->Tx2Urb) if (!pWb35Tx->Tx2Urb)
{ {
usb_free_urb( pWb35Tx->Tx4Urb ); usb_free_urb(pWb35Tx->Tx4Urb);
return false; return false;
} }
return true; return true;
} }
void Wb35Tx_stop(struct hw_data * pHwData) void Wb35Tx_stop(struct hw_data *pHwData)
{ {
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
/* Try to cancel the Trp of EP2 */ /* Try to cancel the Trp of EP2 */
if (pWb35Tx->EP2vm_state == VM_RUNNING) if (pWb35Tx->EP2vm_state == VM_RUNNING)
/* Only use unlink, let Wb35Tx_destroy free them */ /* Only use unlink, let Wb35Tx_destroy free them */
usb_unlink_urb( pWb35Tx->Tx2Urb ); usb_unlink_urb(pWb35Tx->Tx2Urb);
pr_debug("EP2 Tx stop\n"); pr_debug("EP2 Tx stop\n");
/* Try to cancel the Irp of EP4 */ /* Try to cancel the Irp of EP4 */
if (pWb35Tx->EP4vm_state == VM_RUNNING) if (pWb35Tx->EP4vm_state == VM_RUNNING)
/* Only use unlink, let Wb35Tx_destroy free them */ /* Only use unlink, let Wb35Tx_destroy free them */
usb_unlink_urb( pWb35Tx->Tx4Urb ); usb_unlink_urb(pWb35Tx->Tx4Urb);
pr_debug("EP4 Tx stop\n"); pr_debug("EP4 Tx stop\n");
} }
void Wb35Tx_destroy(struct hw_data * pHwData) void Wb35Tx_destroy(struct hw_data *pHwData)
{ {
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
/* Wait for VM stop */ /* Wait for VM stop */
do { do {
msleep(10); /* Delay for waiting function enter 940623.1.a */ msleep(10); /* Delay for waiting function enter 940623.1.a */
} while( (pWb35Tx->EP2vm_state != VM_STOP) && (pWb35Tx->EP4vm_state != VM_STOP) ); } while ((pWb35Tx->EP2vm_state != VM_STOP) && (pWb35Tx->EP4vm_state != VM_STOP));
msleep(10); /* Delay for waiting function enter 940623.1.b */ msleep(10); /* Delay for waiting function enter 940623.1.b */
if (pWb35Tx->Tx4Urb) if (pWb35Tx->Tx4Urb)
usb_free_urb( pWb35Tx->Tx4Urb ); usb_free_urb(pWb35Tx->Tx4Urb);
if (pWb35Tx->Tx2Urb) if (pWb35Tx->Tx2Urb)
usb_free_urb( pWb35Tx->Tx2Urb ); usb_free_urb(pWb35Tx->Tx2Urb);
pr_debug("Wb35Tx_destroy OK\n"); pr_debug("Wb35Tx_destroy OK\n");
} }
void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount) void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount)
{ {
struct hw_data * pHwData = &adapter->sHwData; struct hw_data *pHwData = &adapter->sHwData;
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
unsigned char Trigger = false; unsigned char Trigger = false;
...@@ -200,17 +199,16 @@ void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount) ...@@ -200,17 +199,16 @@ void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount)
static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter); static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter);
static void Wb35Tx_EP2VM_complete(struct urb * pUrb) static void Wb35Tx_EP2VM_complete(struct urb *pUrb)
{ {
struct wbsoft_priv *adapter = pUrb->context; struct wbsoft_priv *adapter = pUrb->context;
struct hw_data * pHwData = &adapter->sHwData; struct hw_data *pHwData = &adapter->sHwData;
struct T02_descriptor T02, TSTATUS; struct T02_descriptor T02, TSTATUS;
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
u32 * pltmp = (u32 *)pWb35Tx->EP2_buf; u32 *pltmp = (u32 *)pWb35Tx->EP2_buf;
u32 i; u32 i;
u16 InterruptInLength; u16 InterruptInLength;
/* Variable setting */ /* Variable setting */
pWb35Tx->EP2vm_state = VM_COMPLETED; pWb35Tx->EP2vm_state = VM_COMPLETED;
pWb35Tx->EP2VM_status = pUrb->status; pWb35Tx->EP2VM_status = pUrb->status;
...@@ -225,7 +223,7 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb) ...@@ -225,7 +223,7 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb)
/* The Urb is completed, check the result */ /* The Urb is completed, check the result */
if (pWb35Tx->EP2VM_status != 0) { if (pWb35Tx->EP2VM_status != 0) {
printk("EP2 IoCompleteRoutine return error\n"); printk("EP2 IoCompleteRoutine return error\n");
pWb35Tx->EP2vm_state= VM_STOP; pWb35Tx->EP2vm_state = VM_STOP;
goto error; goto error;
} }
...@@ -239,7 +237,7 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb) ...@@ -239,7 +237,7 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb)
T02.value |= ((cpu_to_le32(pltmp[i]) & 0xff) << 24); T02.value |= ((cpu_to_le32(pltmp[i]) & 0xff) << 24);
TSTATUS.value = T02.value; /* 20061009 anson's endian */ TSTATUS.value = T02.value; /* 20061009 anson's endian */
Mds_SendComplete( adapter, &TSTATUS ); Mds_SendComplete(adapter, &TSTATUS);
T02.value = cpu_to_le32(pltmp[i]) >> 8; T02.value = cpu_to_le32(pltmp[i]) >> 8;
} }
...@@ -251,10 +249,10 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb) ...@@ -251,10 +249,10 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb)
static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter) static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter)
{ {
struct hw_data * pHwData = &adapter->sHwData; struct hw_data *pHwData = &adapter->sHwData;
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
struct urb * pUrb = (struct urb *)pWb35Tx->Tx2Urb; struct urb *pUrb = (struct urb *)pWb35Tx->Tx2Urb;
u32 * pltmp = (u32 *)pWb35Tx->EP2_buf; u32 *pltmp = (u32 *)pWb35Tx->EP2_buf;
int retv; int retv;
if (pHwData->SurpriseRemove) if (pHwData->SurpriseRemove)
...@@ -264,7 +262,7 @@ static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter) ...@@ -264,7 +262,7 @@ static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter)
goto error; goto error;
/* Issuing URB */ /* Issuing URB */
usb_fill_int_urb( pUrb, pHwData->udev, usb_rcvintpipe(pHwData->udev,2), usb_fill_int_urb(pUrb, pHwData->udev, usb_rcvintpipe(pHwData->udev, 2),
pltmp, MAX_INTERRUPT_LENGTH, Wb35Tx_EP2VM_complete, adapter, 32); pltmp, MAX_INTERRUPT_LENGTH, Wb35Tx_EP2VM_complete, adapter, 32);
pWb35Tx->EP2vm_state = VM_RUNNING; pWb35Tx->EP2vm_state = VM_RUNNING;
...@@ -283,7 +281,7 @@ static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter) ...@@ -283,7 +281,7 @@ static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter)
void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter) void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter)
{ {
struct hw_data * pHwData = &adapter->sHwData; struct hw_data *pHwData = &adapter->sHwData;
struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
/* Allow only one thread to run into function */ /* Allow only one thread to run into function */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment