staging: vt6656: dead code remove RXvWorkItem and RXvFreeRCB

Remove work_struct and queue variables

Remove EnqueueRCB and DequeueRCB macros

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Malcolm Priestley 2014-06-28 23:55:43 +01:00 committed by Greg Kroah-Hartman
parent 8cffb3cf06
commit 068ce7d0a9
3 changed files with 0 additions and 98 deletions

View File

@ -289,8 +289,6 @@ struct vnt_private {
struct usb_device *usb;
struct net_device_stats stats;
struct work_struct read_work_item;
u64 tsf_time;
u8 rx_rate;
@ -308,14 +306,8 @@ struct vnt_private {
u32 int_interval;
/* Variables to track resources for the BULK In Pipe */
struct vnt_rcb *pRCBMem;
struct vnt_rcb *apRCB[CB_MAX_RX_DESC];
u32 cbRD;
struct vnt_rcb *FirstRecvFreeList;
struct vnt_rcb *LastRecvFreeList;
u32 NumRecvFreeList;
int bIsRxWorkItemQueued;
/* Variables to track resources for the BULK Out Pipe */
struct vnt_usb_send_context *apTD[CB_MAX_TX_DESC];
@ -448,27 +440,6 @@ struct vnt_private {
struct iw_statistics wstats; /* wireless stats */
};
#define EnqueueRCB(_Head, _Tail, _RCB) \
{ \
if (!_Head) { \
_Head = _RCB; \
} \
else { \
_Tail->Next = _RCB; \
} \
_RCB->Next = NULL; \
_Tail = _RCB; \
}
#define DequeueRCB(Head, Tail) \
{ \
struct vnt_rcb *RCB = Head; \
if (!RCB->Next) { \
Tail = NULL; \
} \
Head = RCB->Next; \
}
#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) { \
if ((uVar) >= ((uModulo) - 1)) \
(uVar) = 0; \

View File

@ -44,74 +44,6 @@
#include "rf.h"
#include "usbpipe.h"
//static int msglevel =MSG_LEVEL_DEBUG;
static int msglevel =MSG_LEVEL_INFO;
void RXvWorkItem(struct work_struct *work)
{
struct vnt_private *priv =
container_of(work, struct vnt_private, read_work_item);
int status;
struct vnt_rcb *rcb = NULL;
unsigned long flags;
if (priv->Flags & fMP_DISCONNECTED)
return;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n");
spin_lock_irqsave(&priv->lock, flags);
while ((priv->Flags & fMP_POST_READS) && MP_IS_READY(priv) &&
(priv->NumRecvFreeList != 0)) {
rcb = priv->FirstRecvFreeList;
priv->NumRecvFreeList--;
DequeueRCB(priv->FirstRecvFreeList, priv->LastRecvFreeList);
status = PIPEnsBulkInUsbRead(priv, rcb);
}
priv->bIsRxWorkItemQueued = false;
spin_unlock_irqrestore(&priv->lock, flags);
}
void RXvFreeRCB(struct vnt_rcb *rcb, int re_alloc_skb)
{
struct vnt_private *priv = rcb->pDevice;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->RXvFreeRCB\n");
if (re_alloc_skb == false) {
kfree_skb(rcb->skb);
re_alloc_skb = true;
}
if (re_alloc_skb == true) {
rcb->skb = dev_alloc_skb(priv->rx_buf_sz);
/* TODO error handling */
if (!rcb->skb) {
DBG_PRT(MSG_LEVEL_ERR, KERN_ERR
" Failed to re-alloc rx skb\n");
}
}
/* Insert the RCB back in the Recv free list */
EnqueueRCB(priv->FirstRecvFreeList, priv->LastRecvFreeList, rcb);
priv->NumRecvFreeList++;
if ((priv->Flags & fMP_POST_READS) && MP_IS_READY(priv) &&
(priv->bIsRxWorkItemQueued == false)) {
priv->bIsRxWorkItemQueued = true;
schedule_work(&priv->read_work_item);
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----RXFreeRCB %d\n",
priv->NumRecvFreeList);
}
int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
unsigned long bytes_received)
{

View File

@ -1104,7 +1104,6 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)
mutex_init(&priv->usb_lock);
INIT_DELAYED_WORK(&priv->run_command_work, vRunCommand);
INIT_WORK(&priv->read_work_item, RXvWorkItem);
usb_set_intfdata(intf, priv);