Skip to content

Commit c7ce861

Browse files
Thalleynashif
authored andcommitted
usb: shell: Remove use of ctx_shell
The ctx_shell was only used a single place and in a function that already has a `sh` that would be better to use. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 3b47ec6 commit c7ce861

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

subsys/usb/host/usbh_shell.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ LOG_MODULE_REGISTER(usbh_shell, CONFIG_USBH_LOG_LEVEL);
2323

2424
USBH_CONTROLLER_DEFINE(uhs_ctx, DEVICE_DT_GET(DT_NODELABEL(zephyr_uhc0)));
2525
static struct usb_device *udev;
26-
const static struct shell *ctx_shell;
2726
static uint8_t vreq_test_buf[1024];
2827

2928
static void print_dev_desc(const struct shell *sh,
@@ -195,7 +194,7 @@ static int cmd_desc_string(const struct shell *sh,
195194
if (err) {
196195
shell_print(sh, "host: Failed to request configuration descriptor");
197196
} else {
198-
shell_hexdump(ctx_shell, buf->data, buf->len);
197+
shell_hexdump(sh, buf->data, buf->len);
199198
}
200199

201200
usbh_xfer_buf_free(udev, buf);
@@ -426,7 +425,6 @@ static int cmd_usbh_init(const struct shell *sh,
426425
{
427426
int err;
428427

429-
ctx_shell = sh;
430428
udev = usbh_device_get_any(&uhs_ctx);
431429

432430
err = usbh_init(&uhs_ctx);

0 commit comments

Comments
 (0)