• Alan Stern's avatar
    PM / Runtime: Replace boolean arguments with bitflags · 3f9af051
    Alan Stern authored
    The "from_wq" argument in __pm_runtime_suspend() and
    __pm_runtime_resume() supposedly indicates whether or not the function
    was called by the PM workqueue thread, but in fact it isn't always
    used this way.  It really indicates whether or not the function should
    return early if the requested operation is already in progress.
    
    Along with this badly-named boolean argument, later patches in this
    series will add several other boolean arguments to these functions and
    others.  Therefore this patch (as1422) begins the conversion process
    by replacing from_wq with a bitflag argument.  The same bitflags are
    also used in __pm_runtime_get() and __pm_runtime_put(), where they
    indicate whether or not the operation should be asynchronous.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
    3f9af051
runtime.c 28.8 KB