Skip to content
Commit 0224f2c5 authored by Martí Bolívar's avatar Martí Bolívar Committed by Carles Cufi
Browse files

device.h: rework the device_extern.h mechanism



Now that we can iterate over all the status "okay" devicetree nodes
directly using <zephyr/devicetree.h>, use that along with a new helper
macro to pre-declare all possible struct devices.

Unlike the previous implementation, which declared devices even for
disabled nodes, we restrict the new mechanism to only declaring
devices for status "okay" nodes. This keeps drivers honest by not
pre-declaring devices for disabled nodes, which should not be
allocated in the first place.

Signed-off-by: default avatarMartí Bolívar <marti.bolivar@nordicsemi.no>
parent b876edc4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment