diff options
Diffstat (limited to 'drivers/usb/usbip/vhci_tx.c')
-rw-r--r-- | drivers/usb/usbip/vhci_tx.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/usbip/vhci_tx.c b/drivers/usb/usbip/vhci_tx.c index 409fd99f3257..3e7878fe2fd4 100644 --- a/drivers/usb/usbip/vhci_tx.c +++ b/drivers/usb/usbip/vhci_tx.c | |||
@@ -47,16 +47,17 @@ static void setup_cmd_submit_pdu(struct usbip_header *pdup, struct urb *urb) | |||
47 | static struct vhci_priv *dequeue_from_priv_tx(struct vhci_device *vdev) | 47 | static struct vhci_priv *dequeue_from_priv_tx(struct vhci_device *vdev) |
48 | { | 48 | { |
49 | struct vhci_priv *priv, *tmp; | 49 | struct vhci_priv *priv, *tmp; |
50 | unsigned long flags; | ||
50 | 51 | ||
51 | spin_lock(&vdev->priv_lock); | 52 | spin_lock_irqsave(&vdev->priv_lock, flags); |
52 | 53 | ||
53 | list_for_each_entry_safe(priv, tmp, &vdev->priv_tx, list) { | 54 | list_for_each_entry_safe(priv, tmp, &vdev->priv_tx, list) { |
54 | list_move_tail(&priv->list, &vdev->priv_rx); | 55 | list_move_tail(&priv->list, &vdev->priv_rx); |
55 | spin_unlock(&vdev->priv_lock); | 56 | spin_unlock_irqrestore(&vdev->priv_lock, flags); |
56 | return priv; | 57 | return priv; |
57 | } | 58 | } |
58 | 59 | ||
59 | spin_unlock(&vdev->priv_lock); | 60 | spin_unlock_irqrestore(&vdev->priv_lock, flags); |
60 | 61 | ||
61 | return NULL; | 62 | return NULL; |
62 | } | 63 | } |
@@ -136,16 +137,17 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev) | |||
136 | static struct vhci_unlink *dequeue_from_unlink_tx(struct vhci_device *vdev) | 137 | static struct vhci_unlink *dequeue_from_unlink_tx(struct vhci_device *vdev) |
137 | { | 138 | { |
138 | struct vhci_unlink *unlink, *tmp; | 139 | struct vhci_unlink *unlink, *tmp; |
140 | unsigned long flags; | ||
139 | 141 | ||
140 | spin_lock(&vdev->priv_lock); | 142 | spin_lock_irqsave(&vdev->priv_lock, flags); |
141 | 143 | ||
142 | list_for_each_entry_safe(unlink, tmp, &vdev->unlink_tx, list) { | 144 | list_for_each_entry_safe(unlink, tmp, &vdev->unlink_tx, list) { |
143 | list_move_tail(&unlink->list, &vdev->unlink_rx); | 145 | list_move_tail(&unlink->list, &vdev->unlink_rx); |
144 | spin_unlock(&vdev->priv_lock); | 146 | spin_unlock_irqrestore(&vdev->priv_lock, flags); |
145 | return unlink; | 147 | return unlink; |
146 | } | 148 | } |
147 | 149 | ||
148 | spin_unlock(&vdev->priv_lock); | 150 | spin_unlock_irqrestore(&vdev->priv_lock, flags); |
149 | 151 | ||
150 | return NULL; | 152 | return NULL; |
151 | } | 153 | } |