[PATCH 0/7] Port s4.c and s3power.c to use the new power methods
Colin Ian King
colin.king at canonical.com
Thu Jul 31 13:03:31 UTC 2014
On 31/07/14 11:47, Alberto Milone wrote:
> This work allows s4 and s3power to use logind, sysfs, or pm-utils power
> methods.
>
> In addition to working on these new features, I moved all the relevant
> functions into fwts_pm_method.{h|c}, so that s3.c, s3power.c, and s4.c
> can share most of the power method related code, thus minimising code
> duplication.
>
> I haven't included fwts_pm_method.h in fwts.h in order to avoid circular
> dependencies. This means that s3.c, s4.c, and s3power.c all have to
> include fwts_pm_method.h directly (rather than through fwts.h).
>
> Alberto Milone (7):
> Make the --pm-method argument part of fwts_framework
> Store all the pm_method related functions in fwts_pm_method.c
> s3.c: make use of the functions in fwts_power_method.h
> s4.c: add support for logind and sysfs methods
> fwts_pm_method.h: move _cleanup_free_ here and share it with s3 and s4
> s3power.c: add support for logind and sysfs methods
> doc/fwts.1: update man page since --pm-method parameter also applies
> to S4
>
> doc/fwts.1 | 2 +-
> src/acpi/s3/s3.c | 430 +++----------------------------------
> src/acpi/s3power/s3power.c | 121 ++++++++++-
> src/acpi/s4/s4.c | 158 +++++++++++---
> src/lib/include/fwts_framework.h | 2 +
> src/lib/include/fwts_pm_method.h | 99 +++++++++
> src/lib/include/fwts_types.h | 7 +
> src/lib/src/Makefile.am | 6 +-
> src/lib/src/fwts_framework.c | 28 +++
> src/lib/src/fwts_pm_method.c | 446 +++++++++++++++++++++++++++++++++++++++
> 10 files changed, 861 insertions(+), 438 deletions(-)
> create mode 100644 src/lib/include/fwts_pm_method.h
> create mode 100644 src/lib/src/fwts_pm_method.c
>
Thanks Alberto. I've checked these with CoverityScan as well as tested
these on an Lenovo X220 (S3, S4, S3power) using all the 3 different
--pm-method options and it works OK for me. I've reviewed the patched
and I'm giving them all an ACK.
All patches:
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the fwts-devel
mailing list