diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2016-08-19 11:12:57 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-21 16:53:57 +0200 |
commit | 4b1a7cf1cc6aa0ae1a946be8ddddefcd61ff49f1 (patch) | |
tree | 56df94bfc4d3b507ee54192cde88b98b4c9ed854 /drivers/staging/most | |
parent | b24c9fe9fcf9c7a04fa08e5c1da7d156011e6b63 (diff) |
staging: most: hdm-usb: remove completion object
Waiting for the urb_compl object to complete evaluates always as false.
This patch removes this unnecessary completion object.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r-- | drivers/staging/most/hdm-usb/hdm_usb.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c index 26b5c1bac3d2..29e98dc9441d 100644 --- a/drivers/staging/most/hdm-usb/hdm_usb.c +++ b/drivers/staging/most/hdm-usb/hdm_usb.c @@ -72,7 +72,6 @@ struct buf_anchor { struct urb *urb; struct list_head list; - struct completion urb_compl; }; /** @@ -217,12 +216,7 @@ static void free_anchored_buffers(struct most_dev *mdev, unsigned int channel, spin_unlock_irqrestore(lock, flags); if (likely(urb)) { mbo = urb->context; - if (!irqs_disabled()) { - usb_kill_urb(urb); - } else { - usb_unlink_urb(urb); - wait_for_completion(&anchor->urb_compl); - } + usb_kill_urb(urb); if ((mbo) && (mbo->complete)) { mbo->status = status; mbo->processed_length = 0; @@ -416,7 +410,6 @@ static void hdm_write_completion(struct urb *urb) if ((urb->status == -ENOENT) || (urb->status == -ECONNRESET) || (!mdev->is_channel_healthy[channel])) { spin_unlock_irqrestore(lock, flags); - complete(&anchor->urb_compl); return; } @@ -582,7 +575,6 @@ static void hdm_read_completion(struct urb *urb) if ((urb->status == -ENOENT) || (urb->status == -ECONNRESET) || (!mdev->is_channel_healthy[channel])) { spin_unlock_irqrestore(lock, flags); - complete(&anchor->urb_compl); return; } @@ -678,7 +670,6 @@ static int hdm_enqueue(struct most_interface *iface, int channel, } anchor->urb = urb; - init_completion(&anchor->urb_compl); mbo->priv = anchor; if ((mdev->padding_active[channel]) && |