summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2022-12-15 10:15:50 +0100
committerTom Rini <trini@konsulko.com>2023-01-11 15:02:24 -0500
commitd03799004640abfeb656e9db48d6f9b9e24383fb (patch)
treee930acd2e053c08c3ae60ab63e6e4ff4e52749f6 /drivers/usb
parent59dacc319030748817b28cce9c773e15f2b73dc8 (diff)
fastboot: remove #ifdef CONFIG when it is possible
Much of the fastboot code predates the introduction of Kconfig and has quite a few #ifdefs in it which is unnecessary now that we can use IS_ENABLED() et al. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3l
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/f_fastboot.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 07b1681c8a..c6e7f42407 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -495,7 +495,6 @@ static void do_bootm_on_complete(struct usb_ep *ep, struct usb_request *req)
do_exit_on_complete(ep, req);
}
-#if CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT)
static void do_acmd_complete(struct usb_ep *ep, struct usb_request *req)
{
/* When usb dequeue complete will be called
@@ -505,7 +504,6 @@ static void do_acmd_complete(struct usb_ep *ep, struct usb_request *req)
if (req->status == 0)
fastboot_acmd_complete();
}
-#endif
static void rx_handler_command(struct usb_ep *ep, struct usb_request *req)
{
@@ -546,11 +544,10 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req)
fastboot_func->in_req->complete = compl_do_reset;
g_dnl_trigger_detach();
break;
-#if CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT)
case FASTBOOT_COMMAND_ACMD:
- fastboot_func->in_req->complete = do_acmd_complete;
+ if (CONFIG_IS_ENABLED(FASTBOOT_UUU_SUPPORT))
+ fastboot_func->in_req->complete = do_acmd_complete;
break;
-#endif
}
}