Skip to content

Commit 400db36

Browse files
committed
platform: intel: cavs: modify pm_notifier init for older toolchains
With Zephyr commit ae1f13149fcd ("pm: Extend pm notifier to be able to report substate"), the pm_notifier struct was changed to include multiple structs within a union. The xcc toolchain used for cAVS targets cannot initialize the struct with the existing code. Modify the code to work with the new pm.h definition and the old compiler used. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 2608ccf commit 400db36

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/platform/intel/cavs/platform.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ int platform_boot_complete(uint32_t boot_message)
107107
return 0;
108108
}
109109

110-
static struct pm_notifier pm_state_notifier = {
111-
.state_exit = cpu_notify_state_exit,
112-
};
110+
static struct pm_notifier pm_state_notifier;
113111

114112
/* Runs on the primary core only */
115113
int platform_init(struct sof *sof)
@@ -138,6 +136,7 @@ int platform_init(struct sof *sof)
138136
return ret;
139137

140138
/* register power states exit notifiers */
139+
pm_state_notifier.state_exit = cpu_notify_state_exit;
141140
pm_notifier_register(&pm_state_notifier);
142141

143142
/* initialize the host IPC mechanisms */

0 commit comments

Comments
 (0)