drivers: modem: ublox-sara-r4: Convert driver to new DT device macros

Convert ublox-sara-r4 driver:

    NET_DEVICE_OFFLOAD_INIT -> NET_DEVICE_DT_INST_OFFLOAD_DEFINE

DT label is already required, so use it and drop
CONFIG_MODEM_UBLOX_SARA_R4_NAME option.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This commit is contained in:
Marcin Niestroj 2021-02-10 21:35:41 +01:00 committed by Anas Nashif
parent 6e8eb53b51
commit dd55786ffc
2 changed files with 5 additions and 8 deletions

View File

@ -39,10 +39,6 @@ config MODEM_UBLOX_SARA_AUTODETECT_VARIANT
endchoice
config MODEM_UBLOX_SARA_R4_NAME
string "Driver name"
default "MODEM_SARA"
config MODEM_UBLOX_SARA_R4_RX_STACK_SIZE
int "Stack size for the u-blox SARA-R4 modem driver RX thread"
default 1028

View File

@ -1917,7 +1917,8 @@ error:
return ret;
}
NET_DEVICE_OFFLOAD_INIT(modem_sara, CONFIG_MODEM_UBLOX_SARA_R4_NAME,
modem_init, device_pm_control_nop, &mdata, NULL,
CONFIG_MODEM_UBLOX_SARA_R4_INIT_PRIORITY, &api_funcs,
MDM_MAX_DATA_LENGTH);
NET_DEVICE_DT_INST_OFFLOAD_DEFINE(0, modem_init, device_pm_control_nop,
&mdata, NULL,
CONFIG_MODEM_UBLOX_SARA_R4_INIT_PRIORITY,
&api_funcs,
MDM_MAX_DATA_LENGTH);