Skip to content

Commit 184a546

Browse files
gmarullcarlescufi
authored andcommitted
device: use __weak in Z_DEVICE_HANDLES_DEFINE
Use the pre-defined __weak attribute. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent b2d1514 commit 184a546

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

include/zephyr/device.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,8 +882,7 @@ static inline bool z_impl_device_is_ready(const struct device *dev)
882882
extern Z_DEVICE_HANDLES_CONST device_handle_t \
883883
Z_DEVICE_HANDLE_NAME(node_id, dev_id)[]; \
884884
Z_DEVICE_HANDLES_CONST Z_DECL_ALIGN(device_handle_t) \
885-
__attribute__((__weak__, \
886-
__section__(".__device_handles_pass1"))) \
885+
__attribute__((__section__(".__device_handles_pass1"))) __weak \
887886
Z_DEVICE_HANDLE_NAME(node_id, dev_id)[] = { \
888887
COND_CODE_1(DT_NODE_EXISTS(node_id), ( \
889888
DT_DEP_ORD(node_id), \

0 commit comments

Comments
 (0)