Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1483990
| From | Tomeu Vizoso <tomeu.vizoso@collabora.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] PM / Domains: Allow holes in genpd_data.domains array |
| Date | 2016-09-15 13:00 +0200 |
| Message-ID | <shCyC-5VC-17@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
In platforms such as Rockchip's, the array of domains isn't always
filled without holes, as which domains are present depend on the
particular SoC revision.
By allowing holes to be in the array, such SoCs can still use a single
set of constants to index the array of power domains.
Fixes: 0159ec670763 ("PM / Domains: Verify the PM domain is present when adding a provider")
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Jon Hunter <jonathanh@nvidia.com>
Cc: Heiko Stuebner <heiko@sntech.de>
---
drivers/base/power/domain.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index b0cf46dcae73..ce3f483ec67b 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1581,6 +1581,8 @@ int of_genpd_add_provider_onecell(struct device_node *np,
mutex_lock(&gpd_list_lock);
for (i = 0; i < data->num_domains; i++) {
+ if (!data->domains[i])
+ continue;
if (!pm_genpd_present(data->domains[i]))
goto error;
--
2.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] PM / Domains: Allow holes in genpd_data.domains array Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2016-09-15 13:00 +0200
Re: [PATCH] PM / Domains: Allow holes in genpd_data.domains array Jon Hunter <jonathanh@nvidia.com> - 2016-09-15 13:10 +0200
[PATCH v2] PM / Domains: Allow holes in genpd_data.domains array Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2016-09-15 14:10 +0200
Re: [PATCH v2] PM / Domains: Allow holes in genpd_data.domains array Jon Hunter <jonathanh@nvidia.com> - 2016-09-15 15:30 +0200
Re: [PATCH v2] PM / Domains: Allow holes in genpd_data.domains array Ulf Hansson <ulf.hansson@linaro.org> - 2016-09-15 16:20 +0200
Re: [PATCH v2] PM / Domains: Allow holes in genpd_data.domains array Heiko Stübner <heiko@sntech.de> - 2016-09-16 00:10 +0200
Re: [PATCH v2] PM / Domains: Allow holes in genpd_data.domains array Kevin Hilman <khilman@baylibre.com> - 2016-09-16 18:20 +0200
csiph-web