PM: domains: Allocate governor data dynamically based on a genpd governor
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 11 May 2022 14:57:02 +0000 (16:57 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 19 May 2022 18:16:05 +0000 (20:16 +0200)
commitf38d1a6d002526a4e8840e9bb19733e9d4ce1a67
tree9cab2d3e5f7ee14d52d9b5f146c28d87be45aae7
parentba43d6db6e5c6d0b5f58d6487285ed58ba94c5df
PM: domains: Allocate governor data dynamically based on a genpd governor

If a genpd doesn't have an associated governor assigned, several variables
in the struct generic_pm_domain becomes superfluous.

Rather than wasting memory in allocated genpds, let's move the variables
from the struct generic_pm_domain into a new separate struct. In this way,
we can instead dynamically decide when we need to allocate the
corresponding data for it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c
drivers/base/power/domain_governor.c
include/linux/pm_domain.h