Skip to content

Commit 5701ebb

Browse files
mniestrojnashif
authored andcommitted
drivers: wifi: esp: Convert driver to new DT device macros
Convert esp driver: NET_DEVICE_OFFLOAD_INIT -> NET_DEVICE_DT_INST_OFFLOAD_DEFINE DT label is already required, so use it and drop CONFIG_WIFI_ESP_NAME option. Signed-off-by: Marcin Niestroj <[email protected]>
1 parent 1e15ca9 commit 5701ebb

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

drivers/wifi/esp/Kconfig.esp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ menuconfig WIFI_ESP
1212

1313
if WIFI_ESP
1414

15-
config WIFI_ESP_NAME
16-
string "Driver name"
17-
default "esp-wifi-modem"
18-
1915
config WIFI_ESP_RX_STACK_SIZE
2016
int "Stack size for the Espressif esp wifi driver RX thread"
2117
default 1024

drivers/wifi/esp/esp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ static int esp_init(const struct device *dev)
11541154
return ret;
11551155
}
11561156

1157-
NET_DEVICE_OFFLOAD_INIT(wifi_esp, CONFIG_WIFI_ESP_NAME,
1158-
esp_init, device_pm_control_nop, &esp_driver_data, NULL,
1159-
CONFIG_WIFI_INIT_PRIORITY, &esp_api,
1160-
ESP_MTU);
1157+
NET_DEVICE_DT_INST_OFFLOAD_DEFINE(0, esp_init, device_pm_control_nop,
1158+
&esp_driver_data, NULL,
1159+
CONFIG_WIFI_INIT_PRIORITY, &esp_api,
1160+
ESP_MTU);

0 commit comments

Comments
 (0)