aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/usbip/vhci_tx.c
diff options
context:
space:
mode:
authorHarvey Yang <harvey.huawei.yang@gmail.com>2013-01-22 13:31:31 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-22 09:00:10 -0800
commit50b66b5ce4ef40460b85ddc187225e26f91e22c5 (patch)
tree65c4ccf5901251afd21d3a22ec80ac6db6b340a6 /drivers/staging/usbip/vhci_tx.c
parentdcf14779280215d1765141ce04c675df3e4301c5 (diff)
staging: usbip: replace the interrupt safe spinlocks with common ones.
On the client side, we have a virtual hcd driver, there actually no hardware interrupts, so we do not need worry about race conditions caused by irq with spinlock held. Turning off irq is not good for system performance after all. Just replace them with a non interrupt safe version. Signed-off-by: Harvey Yang <harvey.huawei.yang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/usbip/vhci_tx.c')
-rw-r--r--drivers/staging/usbip/vhci_tx.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/staging/usbip/vhci_tx.c b/drivers/staging/usbip/vhci_tx.c
index b1f0dcd68f5..409fd99f325 100644
--- a/drivers/staging/usbip/vhci_tx.c
+++ b/drivers/staging/usbip/vhci_tx.c
@@ -46,18 +46,17 @@ static void setup_cmd_submit_pdu(struct usbip_header *pdup, struct urb *urb)
static struct vhci_priv *dequeue_from_priv_tx(struct vhci_device *vdev)
{
- unsigned long flags;
struct vhci_priv *priv, *tmp;
- spin_lock_irqsave(&vdev->priv_lock, flags);
+ spin_lock(&vdev->priv_lock);
list_for_each_entry_safe(priv, tmp, &vdev->priv_tx, list) {
list_move_tail(&priv->list, &vdev->priv_rx);
- spin_unlock_irqrestore(&vdev->priv_lock, flags);
+ spin_unlock(&vdev->priv_lock);
return priv;
}
- spin_unlock_irqrestore(&vdev->priv_lock, flags);
+ spin_unlock(&vdev->priv_lock);
return NULL;
}
@@ -136,18 +135,17 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev)
static struct vhci_unlink *dequeue_from_unlink_tx(struct vhci_device *vdev)
{
- unsigned long flags;
struct vhci_unlink *unlink, *tmp;
- spin_lock_irqsave(&vdev->priv_lock, flags);
+ spin_lock(&vdev->priv_lock);
list_for_each_entry_safe(unlink, tmp, &vdev->unlink_tx, list) {
list_move_tail(&unlink->list, &vdev->unlink_rx);
- spin_unlock_irqrestore(&vdev->priv_lock, flags);
+ spin_unlock(&vdev->priv_lock);
return unlink;
}
- spin_unlock_irqrestore(&vdev->priv_lock, flags);
+ spin_unlock(&vdev->priv_lock);
return NULL;
}