Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: net: ot: Provide structure instance for HDLC RCP context #84227

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions drivers/hdlc_rcp_if/hdlc_rcp_if_nxp.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
#define LOG_LEVEL CONFIG_HDLC_RCP_IF_DRIVER_LOG_LEVEL
LOG_MODULE_REGISTER(LOG_MODULE_NAME);

struct ot_hdlc_rcp_context {
static struct ot_hdlc_rcp_context {
struct net_if *iface;
struct openthread_context *ot_context;
};
} ot_hdlc_rcp_ctx;

/* -------------------------------------------------------------------------- */
/* Private prototypes */
Expand Down Expand Up @@ -111,7 +111,7 @@ static const struct hdlc_api nxp_hdlc_api = {

NET_DEVICE_DT_INST_DEFINE(0, NULL, /* Initialization Function */
NULL, /* No PM API support */
NULL, /* No context data */
&ot_hdlc_rcp_ctx, /* HDLC RCP context data */
NULL, /* Configuration info */
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, /* Initial priority */
&nxp_hdlc_api, /* API interface functions */
Expand Down
6 changes: 3 additions & 3 deletions drivers/hdlc_rcp_if/hdlc_rcp_if_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ struct openthread_uart {
OT_UART_DEFINE(ot_uart, CONFIG_OPENTHREAD_HDLC_RCP_IF_UART_RX_RING_BUFFER_SIZE,
CONFIG_OPENTHREAD_HDLC_RCP_IF_UART_TX_RING_BUFFER_SIZE);

struct ot_hdlc_rcp_context {
static struct ot_hdlc_rcp_context {
struct net_if *iface;
struct openthread_context *ot_context;
};
} ot_hdlc_rcp_ctx;

/* -------------------------------------------------------------------------- */
/* Private functions */
Expand Down Expand Up @@ -210,7 +210,7 @@ static const struct hdlc_api uart_hdlc_api = {

NET_DEVICE_DT_INST_DEFINE(0, NULL, /* Initialization Function */
NULL, /* No PM API support */
NULL, /* No context data */
&ot_hdlc_rcp_ctx, /* HDLC RCP context data */
NULL, /* Configuration info */
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, /* Initial priority */
&uart_hdlc_api, /* API interface functions */
Expand Down
Loading