PM / Runtime: Replace boolean arguments with bitflags
authorAlan Stern <stern@rowland.harvard.edu>
Sat, 25 Sep 2010 21:34:54 +0000 (23:34 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Sat, 16 Oct 2010 23:57:44 +0000 (01:57 +0200)
commit3f9af0513ae5b1f185302c2d0ba656640926d970
tree5f99b98aca875a812f444721a88a3fc3de842538
parent4769373ca2c8d0b999749a070c48fd8648888831
PM / Runtime: Replace boolean arguments with bitflags

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: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/base/power/runtime.c
include/linux/pm_runtime.h