[PATCH 6/8] PM / Domains: Abstract genpd locking
Ulf Hansson
ulf.hansson at linaro.org
Thu Oct 6 03:56:20 PDT 2016
On 5 October 2016 at 22:31, Lina Iyer <lina.iyer at linaro.org> wrote:
> Abstract genpd lock/unlock calls, in preparation for domain specific
> locks added in the following patches.
>
> Cc: Kevin Hilman <khilman at kernel.org>
> Cc: Rafael J. Wysocki <rjw at rjwysocki.net>
> Signed-off-by: Lina Iyer <lina.iyer at linaro.org>
> Signed-off-by: Ulf Hansson <ulf.hansson at linaro.org>
> ---
> drivers/base/power/domain.c | 121 +++++++++++++++++++++++++++++---------------
> include/linux/pm_domain.h | 5 +-
> 2 files changed, 85 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 52fcdb2..82e6a33 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -39,6 +39,46 @@
> static LIST_HEAD(gpd_list);
> static DEFINE_MUTEX(gpd_list_lock);
>
> +struct genpd_lock_fns {
May I suggest you to rename the struct to "genpd_lock_ops"?
I think "*_ops" is in general what we use in the kernel for callbacks
and functions pointers like these.
> + void (*lock)(struct generic_pm_domain *genpd);
> + void (*lock_nested)(struct generic_pm_domain *genpd, int depth);
> + int (*lock_interruptible)(struct generic_pm_domain *genpd);
> + void (*unlock)(struct generic_pm_domain *genpd);
> +};
> +
[...]
Otherwise this looks good to me!
Kind regards
Uffe
More information about the linux-arm-kernel
mailing list