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
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 07b1681..c6e7f42 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -495,7 +495,6 @@
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 @@
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 @@
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
}
}