diff --git a/include/init.h b/include/init.h index 86373e38ab4..fe3ed29b7dd 100644 --- a/include/init.h +++ b/include/init.h @@ -97,10 +97,6 @@ * * @return A pointer to the device object created by SYS_DEFINE_DEVICE() */ - -#define _PASTE2(a, b) a##b -#define _PASTE(a, b) _PASTE2(a, b) - -#define SYS_GET_DEVICE(name) (&(_PASTE(__initconfig_, name))) +#define SYS_GET_DEVICE(name) (&(_CONCAT(__initconfig_, name))) #endif /* _INIT_H_ */ diff --git a/include/toolchain/common.h b/include/toolchain/common.h index b23b6e95b3e..ea2dc61da53 100644 --- a/include/toolchain/common.h +++ b/include/toolchain/common.h @@ -111,3 +111,6 @@ #define __stack __aligned(STACK_ALIGN) +/* concatenate the values of the arguments into one */ +#define _DO_CONCAT(x, y) x ## y +#define _CONCAT(x, y) _DO_CONCAT(x, y)