diff options
author | Chris Kay <chris.kay@arm.com> | 2019-02-08 10:52:34 +0000 |
---|---|---|
committer | ronald-cron-arm <39518861+ronald-cron-arm@users.noreply.github.com> | 2019-02-26 08:40:42 +0100 |
commit | 436676bcbb024cb2e68f2adc1bb9b0a3b21a4da8 (patch) | |
tree | 9b03075e71bd3be1fa436901cd7b1bb041a452fe /module/system_power | |
parent | fd304279e13b5eacf5130ed4fa8f3a733badef3e (diff) |
system_power: Fix extended PPU support
This patch fixes an issue in the support for extended PPU handling in
system_power, where the ext_ppu_apis field represented a pointer to an
API structure, whilst being initialised like a pointer to an array of
pointers to API structures.
This manifested itself in a crash whenever the module tried to iterate
over the array to perform power management tasks.
Change-Id: I81d071d82f8ed0f677f585a83670ed519cdb8d26
Signed-off-by: Chris Kay <chris.kay@arm.com>
Diffstat (limited to 'module/system_power')
-rw-r--r-- | module/system_power/src/mod_system_power.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/system_power/src/mod_system_power.c b/module/system_power/src/mod_system_power.c index 21f618cf..2b7eaca1 100644 --- a/module/system_power/src/mod_system_power.c +++ b/module/system_power/src/mod_system_power.c @@ -32,7 +32,7 @@ struct system_power_ctx { const struct mod_pd_driver_api *sys1_api; /* Pointer to array of extended PPU power domain driver APIs */ - const struct mod_pd_driver_api *ext_ppu_apis; + const struct mod_pd_driver_api **ext_ppu_apis; /* Power domain module restricted API pointer */ const struct mod_pd_restricted_api *mod_pd_restricted_api; @@ -65,7 +65,7 @@ static void ext_ppus_set_state(enum mod_pd_state state) unsigned int i; for (i = 0; i < system_power_ctx.config->ext_ppus_count; i++) { - system_power_ctx.ext_ppu_apis[i].set_state( + system_power_ctx.ext_ppu_apis[i]->set_state( system_power_ctx.config->ext_ppus[i].ppu_id, state); } |