Skip to content
Commit b8ce1761 authored by Flavio Ceolin's avatar Flavio Ceolin Committed by Benjamin Cabé
Browse files

pm: policy: Fix possible undefined reference



When PM_POLICY_DEVICE_CONSTRAINTS is enabled, we create a list of
devices with the property “zephyr,disabling-power-states” and their
respective states to lock. However, if a device is declared but not
built (e.g., due to a Kconfig option), we have an undefined reference.

This PR changes the code to use the device name instead of the
reference. This increases lookup time (which could be cached at
runtime), and we still have an entry for a non-existent device.

Signed-off-by: default avatarFlavio Ceolin <flavio@hubblenetwork.com>
parent 89c29a9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment