diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2019-03-16 00:59:25 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-04-10 10:03:22 +0200 |
commit | f2a424f6c613a98560dc49fd9984589401d51648 (patch) | |
tree | c0b236133992b2d6074215ba8cfc6bc14573345c /drivers/virtio/Makefile | |
parent | 0b237cb2fc7b10b2c4e92477760fa7442847c804 (diff) | |
download | lwn-f2a424f6c613a98560dc49fd9984589401d51648.tar.gz lwn-f2a424f6c613a98560dc49fd9984589401d51648.zip |
PM / core: Introduce dpm_async_fn() helper
When we want to execute device pm functions asynchronously, we'll
do the following for the device:
1) reinit_completion(&dev->power.completion);
2) Check if the device enables asynchronous suspend.
3) If necessary, execute the corresponding function asynchronously.
There are a lot of such repeated operations here, in fact we can avoid
this. So introduce dpm_async_fn() to have better code readability and
reuse.
And use this function to do some cleanup.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/virtio/Makefile')
0 files changed, 0 insertions, 0 deletions