device: Fix structure attributes access
Since struct devconfig was merged earlier into struct device, let's fix accessing config_info, name, ... attributes everywhere via: grep -rlZ 'dev->config->' | xargs -0 sed -i 's/dev->config->/dev->/g' Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
8d7bb8ffd8
commit
97326c0445
348 changed files with 1155 additions and 1174 deletions
|
@ -321,7 +321,7 @@ static void gsm_finalize_connection(struct gsm_modem *gsm)
|
|||
if (IS_ENABLED(CONFIG_GSM_MUX) && gsm->mux_enabled) {
|
||||
/* Re-use the original iface for AT channel */
|
||||
ret = modem_iface_uart_init_dev(&gsm->context.iface,
|
||||
gsm->at_dev->config->name);
|
||||
gsm->at_dev->name);
|
||||
if (ret < 0) {
|
||||
LOG_DBG("iface %suart error %d", "AT ", ret);
|
||||
} else {
|
||||
|
@ -337,7 +337,7 @@ static void gsm_finalize_connection(struct gsm_modem *gsm)
|
|||
ret, "AT cmds failed");
|
||||
} else {
|
||||
LOG_INF("AT channel %d connected to %s",
|
||||
DLCI_AT, gsm->at_dev->config->name);
|
||||
DLCI_AT, gsm->at_dev->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ static void mux_setup_next(struct gsm_modem *gsm)
|
|||
static void mux_attach_cb(struct device *mux, int dlci_address,
|
||||
bool connected, void *user_data)
|
||||
{
|
||||
LOG_DBG("DLCI %d to %s %s", dlci_address, mux->config->name,
|
||||
LOG_DBG("DLCI %d to %s %s", dlci_address, mux->name,
|
||||
connected ? "connected" : "disconnected");
|
||||
|
||||
if (connected) {
|
||||
|
@ -413,7 +413,7 @@ static int mux_attach(struct device *mux, struct device *uart,
|
|||
user_data);
|
||||
if (ret < 0) {
|
||||
LOG_ERR("Cannot attach DLCI %d (%s) to %s (%d)", dlci_address,
|
||||
mux->config->name, uart->config->name, ret);
|
||||
mux->name, uart->name, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -486,7 +486,7 @@ static void mux_setup(struct k_work *work)
|
|||
* to the modem.
|
||||
*/
|
||||
ret = modem_iface_uart_init_dev(&gsm->context.iface,
|
||||
gsm->ppp_dev->config->name);
|
||||
gsm->ppp_dev->name);
|
||||
if (ret < 0) {
|
||||
LOG_DBG("iface %suart error %d", "PPP ", ret);
|
||||
gsm->mux_enabled = false;
|
||||
|
@ -494,7 +494,7 @@ static void mux_setup(struct k_work *work)
|
|||
}
|
||||
|
||||
LOG_INF("PPP channel %d connected to %s",
|
||||
DLCI_PPP, gsm->ppp_dev->config->name);
|
||||
DLCI_PPP, gsm->ppp_dev->name);
|
||||
|
||||
gsm_finalize_connection(gsm);
|
||||
break;
|
||||
|
|
|
@ -33,14 +33,14 @@ struct modem_shell_user_data {
|
|||
#define ms_send(ctx_, buf_, size_) \
|
||||
(ctx_->iface.write(&ctx_->iface, buf_, size_))
|
||||
#define ms_context_from_id modem_context_from_id
|
||||
#define UART_DEV_NAME(ctx) (ctx->iface.dev->config->name)
|
||||
#define UART_DEV_NAME(ctx) (ctx->iface.dev->name)
|
||||
#elif defined(CONFIG_MODEM_RECEIVER)
|
||||
#include "modem_receiver.h"
|
||||
#define ms_context mdm_receiver_context
|
||||
#define ms_max_context CONFIG_MODEM_RECEIVER_MAX_CONTEXTS
|
||||
#define ms_send mdm_receiver_send
|
||||
#define ms_context_from_id mdm_receiver_context_from_id
|
||||
#define UART_DEV_NAME(ctx_) (ctx_->uart_dev->config->name)
|
||||
#define UART_DEV_NAME(ctx_) (ctx_->uart_dev->name)
|
||||
#else
|
||||
#error "MODEM_CONTEXT or MODEM_RECEIVER need to be enabled"
|
||||
#endif
|
||||
|
@ -159,7 +159,7 @@ static void uart_mux_cb(struct device *uart, struct device *dev,
|
|||
|
||||
shell_fprintf(shell, SHELL_NORMAL,
|
||||
"%s\t\t%s\t\t%d (%s)\n",
|
||||
uart->config->name, dev->config->name, dlci_address, ch);
|
||||
uart->name, dev->name, dlci_address, ch);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue