Browse Source

staging: vt6656: Remove variable fKillEventPollingThread

We already kill the urb and since patch
s_nsInterruptUsbIoCompleteRead add urb status returns.
have error handling

There is no need for this variable.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley 11 years ago
parent
commit
749627f2d8

+ 0 - 1
drivers/staging/vt6656/device.h

@@ -421,7 +421,6 @@ struct vnt_private {
 
 
 	/* Variables to track resources for the Interrupt In Pipe */
 	/* Variables to track resources for the Interrupt In Pipe */
 	INT_BUFFER intBuf;
 	INT_BUFFER intBuf;
-	int fKillEventPollingThread;
 	int bEventAvailable;
 	int bEventAvailable;
 
 
 	/* default config from file by user setting */
 	/* default config from file by user setting */

+ 3 - 2
drivers/staging/vt6656/int.c

@@ -70,8 +70,9 @@ void INTvWorkItem(struct vnt_private *pDevice)
 	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Interrupt Polling Thread\n");
 	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Interrupt Polling Thread\n");
 
 
 	spin_lock_irq(&pDevice->lock);
 	spin_lock_irq(&pDevice->lock);
-	if (pDevice->fKillEventPollingThread != true)
-		ntStatus = PIPEnsInterruptRead(pDevice);
+
+	ntStatus = PIPEnsInterruptRead(pDevice);
+
 	spin_unlock_irq(&pDevice->lock);
 	spin_unlock_irq(&pDevice->lock);
 }
 }
 
 

+ 0 - 2
drivers/staging/vt6656/main_usb.c

@@ -1000,7 +1000,6 @@ static int  device_open(struct net_device *dev)
     pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
     pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
 
 
     pDevice->bIsRxWorkItemQueued = true;
     pDevice->bIsRxWorkItemQueued = true;
-    pDevice->fKillEventPollingThread = false;
     pDevice->bEventAvailable = false;
     pDevice->bEventAvailable = false;
 
 
    pDevice->bWPADEVUp = false;
    pDevice->bWPADEVUp = false;
@@ -1084,7 +1083,6 @@ static int device_close(struct net_device *dev)
     MP_SET_FLAG(pDevice, fMP_DISCONNECTED);
     MP_SET_FLAG(pDevice, fMP_DISCONNECTED);
     MP_CLEAR_FLAG(pDevice, fMP_POST_WRITES);
     MP_CLEAR_FLAG(pDevice, fMP_POST_WRITES);
     MP_CLEAR_FLAG(pDevice, fMP_POST_READS);
     MP_CLEAR_FLAG(pDevice, fMP_POST_READS);
-    pDevice->fKillEventPollingThread = true;
 
 
 	cancel_delayed_work_sync(&pDevice->run_command_work);
 	cancel_delayed_work_sync(&pDevice->run_command_work);
 	cancel_delayed_work_sync(&pDevice->second_callback_work);
 	cancel_delayed_work_sync(&pDevice->second_callback_work);

+ 1 - 3
drivers/staging/vt6656/usbpipe.c

@@ -393,7 +393,6 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
 
 
 //        if (ntStatus == STATUS_NOT_CONNECTED )
 //        if (ntStatus == STATUS_NOT_CONNECTED )
 //        {
 //        {
-            pDevice->fKillEventPollingThread = true;
 //        }
 //        }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"IntUSBIoCompleteControl STATUS = %d\n", ntStatus );
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"IntUSBIoCompleteControl STATUS = %d\n", ntStatus );
     } else {
     } else {
@@ -403,7 +402,6 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
 	    INTnsProcessData(pDevice);
 	    INTnsProcessData(pDevice);
     }
     }
 
 
-    if (pDevice->fKillEventPollingThread != true) {
 	ntStatus = usb_submit_urb(pDevice->pInterruptURB, GFP_ATOMIC);
 	ntStatus = usb_submit_urb(pDevice->pInterruptURB, GFP_ATOMIC);
 	if (ntStatus) {
 	if (ntStatus) {
 		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
 		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
@@ -411,7 +409,7 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
 	} else {
 	} else {
 		pDevice->intBuf.bInUse = true;
 		pDevice->intBuf.bInUse = true;
 	}
 	}
-    }
+
     //
     //
     // We return STATUS_MORE_PROCESSING_REQUIRED so that the completion
     // We return STATUS_MORE_PROCESSING_REQUIRED so that the completion
     // routine (IofCompleteRequest) will stop working on the irp.
     // routine (IofCompleteRequest) will stop working on the irp.