summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r--drivers/net/wireless/p54/p54usb.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index 44d6855bd17c..9539ddcf379f 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -430,14 +430,16 @@ static const char p54u_firmware_upload_3887[] = "<\r";
static int p54u_device_reset_3887(struct ieee80211_hw *dev)
{
struct p54u_priv *priv = dev->priv;
- int ret, lock;
+ int ret, lock = (priv->intf->condition != USB_INTERFACE_BINDING);
u8 buf[4];
- ret = lock = usb_lock_device_for_reset(priv->udev, priv->intf);
- if (ret < 0) {
- dev_err(&priv->udev->dev, "(p54usb) unable to lock device for "
- "reset: %d\n", ret);
- return ret;
+ if (lock) {
+ ret = usb_lock_device_for_reset(priv->udev, priv->intf);
+ if (ret < 0) {
+ dev_err(&priv->udev->dev, "(p54usb) unable to lock "
+ " device for reset: %d\n", ret);
+ return ret;
+ }
}
ret = usb_reset_device(priv->udev);
OpenPOWER on IntegriCloud