From ab00842e42e96b9579c80d804bb75ef6b3647eb9 Mon Sep 17 00:00:00 2001 From: Bjarki AA Date: Sun, 5 Jun 2022 12:17:43 +0200 Subject: [PATCH] drivers/modem: add user_data to modem_cmd_handler_data added user_data field to modem_cmd_handler_data this allows for multiple instances of modem drivers which use the modem cmd handler. currently, the only identifiable parameter passed to the modem command handlers is the modem_cmd_handler_data struct. The added user_data variable allows for the a modem driver to pass its dev or data pointer to the modem_cmd_handler_data struct to be retrieved from within the modem command callbacks. Signed-off-by: Bjarki AA --- drivers/modem/modem_cmd_handler.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/modem/modem_cmd_handler.h b/drivers/modem/modem_cmd_handler.h index 237b53713ec..b170861cfd0 100644 --- a/drivers/modem/modem_cmd_handler.h +++ b/drivers/modem/modem_cmd_handler.h @@ -118,6 +118,9 @@ struct modem_cmd_handler_data { /* locks */ struct k_sem sem_tx_lock; struct k_sem sem_parse_lock; + + /* user data */ + void *user_data; }; /**