Skip to content

Commit 9dfbae0

Browse files
galakcarlescufi
authored andcommitted
wifi: eswifi: Convert to DEVICE_DT_GET
Move to using DEVICE_DT_GET so we can phase out DT_LABEL. Signed-off-by: Kumar Gala <[email protected]>
1 parent 97720be commit 9dfbae0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/wifi/eswifi/eswifi_bus_uart.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,9 @@ int eswifi_uart_init(struct eswifi_dev *eswifi)
219219
{
220220
struct eswifi_uart_data *uart = &eswifi_uart0; /* Static instance */
221221

222-
uart->dev = device_get_binding(DT_INST_BUS_LABEL(0));
223-
if (!uart->dev) {
224-
LOG_ERR("Failed to initialize uart driver");
222+
uart->dev = DEVICE_DT_GET(DT_INST_BUS(0));
223+
if (!device_is_ready(uart->dev)) {
224+
LOG_ERR("Bus device is not ready");
225225
return -ENODEV;
226226
}
227227

0 commit comments

Comments
 (0)