Skip to content

Commit b2d1514

Browse files
gmarullcarlescufi
authored andcommitted
device: use Z_DECL_ALIGN in Z_DEVICE_HANDLES_DEFINE
Z_DECL_ALIGN is equivalent to the manually specified __aligned(sizeof(type)). Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent cfd3560 commit b2d1514

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
@@ -881,8 +881,7 @@ static inline bool z_impl_device_is_ready(const struct device *dev)
881881
#define Z_DEVICE_HANDLES_DEFINE(node_id, dev_id, ...) \
882882
extern Z_DEVICE_HANDLES_CONST device_handle_t \
883883
Z_DEVICE_HANDLE_NAME(node_id, dev_id)[]; \
884-
Z_DEVICE_HANDLES_CONST device_handle_t \
885-
__aligned(sizeof(device_handle_t)) \
884+
Z_DEVICE_HANDLES_CONST Z_DECL_ALIGN(device_handle_t) \
886885
__attribute__((__weak__, \
887886
__section__(".__device_handles_pass1"))) \
888887
Z_DEVICE_HANDLE_NAME(node_id, dev_id)[] = { \

0 commit comments

Comments
 (0)