[PATCH] staging: vt6656: code cleanup in vt6656 DMA TX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lindented, removed unused variables and cleared checkpatch warnings.

Signed-off-by: Andres More <more.andres@xxxxxxxxx>
---
 drivers/staging/vt6656/main_usb.c |   32 ++++++++++----------------------
 1 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 51a858f..d943fb9 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -1292,34 +1292,22 @@ static void __devexit vt6656_disconnect(struct usb_interface *intf)
 	}
 }
 
-static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) {
-    PSDevice        pDevice=netdev_priv(dev);
-    PBYTE           pbMPDU;
-    unsigned int            cbMPDULen = 0;
-
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_tx_80211\n");
-    spin_lock_irq(&pDevice->lock);
-
-    if (pDevice->bStopTx0Pkt == TRUE) {
-        dev_kfree_skb_irq(skb);
-        spin_unlock_irq(&pDevice->lock);
-        return 0;
-    };
-
-
-    cbMPDULen = skb->len;
-    pbMPDU = skb->data;
+static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev)
+{
+	PSDevice pDevice = netdev_priv(dev);
 
-    vDMA0_tx_80211(pDevice, skb);
+	spin_lock_irq(&pDevice->lock);
 
-    spin_unlock_irq(&pDevice->lock);
+	if (unlikely(pDevice->bStopTx0Pkt))
+		dev_kfree_skb_irq(skb);
+	else
+		vDMA0_tx_80211(pDevice, skb);
 
-    return 0;
+	spin_unlock_irq(&pDevice->lock);
 
+	return NETDEV_TX_OK;
 }
 
-
 static int  device_xmit(struct sk_buff *skb, struct net_device *dev) {
     PSDevice    pDevice=netdev_priv(dev);
     struct net_device_stats* pStats = &pDevice->stats;
-- 
1.7.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux