From bd9249457ac7d6b5094361fa1237bff732389628 Mon Sep 17 00:00:00 2001 From: Pisit Sawangvonganan Date: Fri, 3 Jan 2025 16:08:01 +0700 Subject: [PATCH] bluetooth: shell: completely eliminate the dependency on `ctx_shell` This commit removes the `ctx_shell` declaration from the Bluetooth shell, marking a milestone in eliminating this dependency. Signed-off-by: Pisit Sawangvonganan --- subsys/bluetooth/host/shell/bt.c | 3 --- subsys/bluetooth/host/shell/bt.h | 1 - 2 files changed, 4 deletions(-) diff --git a/subsys/bluetooth/host/shell/bt.c b/subsys/bluetooth/host/shell/bt.c index 45a586034451..47eeb7503b25 100644 --- a/subsys/bluetooth/host/shell/bt.c +++ b/subsys/bluetooth/host/shell/bt.c @@ -45,7 +45,6 @@ static bool no_settings_load; uint8_t selected_id = BT_ID_DEFAULT; -const struct shell *ctx_shell; #if defined(CONFIG_BT_CONN) struct bt_conn *default_conn; @@ -1310,8 +1309,6 @@ static int cmd_init(const struct shell *sh, size_t argc, char *argv[]) int err; bool sync = false; - ctx_shell = sh; - for (size_t argn = 1; argn < argc; argn++) { const char *arg = argv[argn]; diff --git a/subsys/bluetooth/host/shell/bt.h b/subsys/bluetooth/host/shell/bt.h index 9ba015f7e176..12332d1b21cc 100644 --- a/subsys/bluetooth/host/shell/bt.h +++ b/subsys/bluetooth/host/shell/bt.h @@ -16,7 +16,6 @@ #include #include -extern const struct shell *ctx_shell; extern struct bt_conn *default_conn; bool passes_scan_filter(const struct bt_le_scan_recv_info *info, const struct net_buf_simple *buf);