diff options
author | hayeswang <hayeswang@realtek.com> | 2014-10-29 11:12:17 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-30 15:49:00 -0400 |
commit | e3bd1a81cd1e3f8ed961e642e97206d715db06c4 (patch) | |
tree | 11c87eb8affe17bacfb56ac2b1c5f553d441e3db /drivers/net/usb | |
parent | f4c7476b041d200c3b347f019eebf05e6d0b47f9 (diff) | |
download | op-kernel-dev-e3bd1a81cd1e3f8ed961e642e97206d715db06c4.zip op-kernel-dev-e3bd1a81cd1e3f8ed961e642e97206d715db06c4.tar.gz |
r8152: check WORK_ENABLE in suspend function
Avoid unnecessary behavior when autosuspend occurs during open().
The relative processes should only be run after finishing open().
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/r8152.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f224231..ca3c5d5 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -3207,7 +3207,7 @@ static int rtl8152_suspend(struct usb_interface *intf, pm_message_t message) netif_device_detach(netdev); } - if (netif_running(netdev)) { + if (netif_running(netdev) && test_bit(WORK_ENABLE, &tp->flags)) { clear_bit(WORK_ENABLE, &tp->flags); usb_kill_urb(tp->intr_urb); tasklet_disable(&tp->tl); |