]> git.baikalelectronics.ru Git - kernel.git/commit
r8152: move calling delay_autosuspend function
authorhayeswang <hayeswang@realtek.com>
Tue, 13 Jun 2017 07:14:40 +0000 (15:14 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Jun 2017 15:37:13 +0000 (11:37 -0400)
commit4a17c67636dc925a275b00f04780b2e661b8fe25
tree12f9199896a4413b366ca7082bb01deec4562a21
parent80f8b0f364691a1fad9463666412aaaf98181ed0
r8152: move calling delay_autosuspend function

Move calling delay_autosuspend() in rtl8152_runtime_suspend(). Calling
delay_autosuspend() as late as possible.

The original flows are
   1. check if the driver/device is busy now.
   2. set wake events.
   3. enter runtime suspend.

If the wake event occurs between (1) and (2), the device may miss it. Besides,
to avoid the runtime resume occurs after runtime suspend immediately, move the
checking to the end of rtl8152_runtime_suspend().

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c