PM / Domains: Re-order initialization of generic_pm_domain_data
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 27 Jan 2015 20:13:44 +0000 (21:13 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 3 Feb 2015 21:56:54 +0000 (22:56 +0100)
commitf104e1e5ef5788f02de2053bfbd0f02d629b6036
treef336adc77a74f738525b3693dcf5bb6fbd08423e
parent3e235685de3f7e53e17d671b2379df10c6dfa4f2
PM / Domains: Re-order initialization of generic_pm_domain_data

Move the initialization of the struct generic_pm_domain_data into
genpd_alloc_dev_data(), including the assignment of the device's
->pm_domain() callback. Make corresponding changes to
genpd_free_dev_data().

These changes will make the related code more readable. It will also
decrease the critical regions for where genpd's mutex is being held and
for where the device's power related spinlock is being held.

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