• hayeswang's avatar
    r8152: move calling delay_autosuspend function · bd882982
    hayeswang authored
    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: default avatarHayes Wang <hayeswang@realtek.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    bd882982
r8152.c 122 KB