driver: modem: Fix mux device name comparison
CONFIG_UART_MUX_DEVICE_NAME is used as a prefix for the uart muxes name. Pointer comparison will always return false Fix #39774 Signed-off-by: Guillaume Lager <g.lager@innoseis.com>
This commit is contained in:
parent
8e95b95bb4
commit
ec0d5b6e8d
1 changed files with 2 additions and 2 deletions
|
@ -130,8 +130,8 @@ static bool mux_is_active(struct modem_iface *iface)
|
|||
bool active = false;
|
||||
|
||||
#if defined(CONFIG_UART_MUX_DEVICE_NAME)
|
||||
const char *mux_name = CONFIG_UART_MUX_DEVICE_NAME;
|
||||
active = (mux_name == iface->dev->name);
|
||||
active = strncmp(CONFIG_UART_MUX_DEVICE_NAME, iface->dev->name,
|
||||
sizeof(CONFIG_UART_MUX_DEVICE_NAME) - 1) == 0;
|
||||
#endif /* CONFIG_UART_MUX_DEVICE_NAME */
|
||||
|
||||
return active;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue