From eebf5de051626d94036634aa635b30d84f9c85c1 Mon Sep 17 00:00:00 2001 From: Jose Alamos Date: Tue, 22 Jun 2021 11:02:03 +0200 Subject: [PATCH] auto_init/loramac: avoid explicit cast to netdev --- sys/auto_init/loramac/auto_init_loramac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/auto_init/loramac/auto_init_loramac.c b/sys/auto_init/loramac/auto_init_loramac.c index fd0ca3cd59..be91007d78 100644 --- a/sys/auto_init/loramac/auto_init_loramac.c +++ b/sys/auto_init/loramac/auto_init_loramac.c @@ -48,13 +48,13 @@ void auto_init_loramac(void) { #if IS_USED(MODULE_SX127X) sx127x_setup(&sx127x, &sx127x_params[0], 0); - loramac.netdev = (netdev_t *)&sx127x; + loramac.netdev = &sx127x.netdev; loramac.netdev->driver = &sx127x_driver; #endif #if IS_USED(MODULE_SX126X) sx126x_setup(&sx126x, &sx126x_params[0], 0); - loramac.netdev = (netdev_t *)&sx126x; + loramac.netdev = &sx126x.netdev; loramac.netdev->driver = &sx126x_driver; #endif