Skip to content

Commit

Permalink
net: qmi_wwan: manage_power should always set needs_remote_wakeup
Browse files Browse the repository at this point in the history
Reported-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Bjørn Mork authored and David S. Miller committed Nov 4, 2013
1 parent 04d948a commit 79d9b62
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/net/usb/qmi_wwan.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static const struct net_device_ops qmi_wwan_netdev_ops = {
static int qmi_wwan_manage_power(struct usbnet *dev, int on)
{
struct qmi_wwan_state *info = (void *)&dev->data;
int rv = 0;
int rv;

dev_dbg(&dev->intf->dev, "%s() pmcount=%d, on=%d\n", __func__,
atomic_read(&info->pmcount), on);
Expand All @@ -160,13 +160,11 @@ static int qmi_wwan_manage_power(struct usbnet *dev, int on)
* the new value
*/
rv = usb_autopm_get_interface(dev->intf);
if (rv < 0)
goto err;
dev->intf->needs_remote_wakeup = on;
usb_autopm_put_interface(dev->intf);
if (!rv)
usb_autopm_put_interface(dev->intf);
}
err:
return rv;
return 0;
}

static int qmi_wwan_cdc_wdm_manage_power(struct usb_interface *intf, int on)
Expand Down

0 comments on commit 79d9b62

Please sign in to comment.