Skip to content

Commit 687c333

Browse files
jukkarAnas Nashif
authored andcommitted
net: if: Use DEVICE_NAME_GET() instead of fixed string
The DEVICE_NAME_GET() macro should be used instead of fixed string when creating a device pointer in net_if_dev structure. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 938a969 commit 687c333

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/net/net_if.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ struct net_if_api {
15781578
#define NET_IF_INIT(dev_name, sfx, _l2, _mtu, _num_configs) \
15791579
static struct net_if_dev (NET_IF_DEV_GET_NAME(dev_name, sfx)) \
15801580
__used __attribute__((__section__(".net_if_dev.data"))) = { \
1581-
.dev = &(__device_##dev_name), \
1581+
.dev = &(DEVICE_NAME_GET(dev_name)), \
15821582
.l2 = &(NET_L2_GET_NAME(_l2)), \
15831583
.l2_data = &(NET_L2_GET_DATA(dev_name, sfx)), \
15841584
.mtu = _mtu, \

0 commit comments

Comments
 (0)