summaryrefslogtreecommitdiff
path: root/net
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 /net
parent59dacc319030748817b28cce9c773e15f2b73dc8 (diff)
downloadu-boot-d03799004640abfeb656e9db48d6f9b9e24383fb.tar.gz
u-boot-d03799004640abfeb656e9db48d6f9b9e24383fb.tar.bz2
u-boot-d03799004640abfeb656e9db48d6f9b9e24383fb.zip
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 'net')
-rw-r--r--net/fastboot.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/fastboot.c b/net/fastboot.c
index 139233b86c..96bdf5486f 100644
--- a/net/fastboot.c
+++ b/net/fastboot.c
@@ -42,7 +42,6 @@ static int fastboot_our_port;
static void boot_downloaded_image(void);
-#if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
/**
* fastboot_udp_send_info() - Send an INFO packet during long commands.
*
@@ -104,7 +103,6 @@ static void fastboot_timed_send_info(const char *msg)
fastboot_udp_send_info(msg);
}
}
-#endif
/**
* fastboot_send() - Sends a packet in response to received fastboot packet
@@ -309,9 +307,9 @@ void fastboot_start_server(void)
fastboot_our_port = CONFIG_UDP_FUNCTION_FASTBOOT_PORT;
-#if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
- fastboot_set_progress_callback(fastboot_timed_send_info);
-#endif
+ if (CONFIG_IS_ENABLED(FASTBOOT_FLASH))
+ fastboot_set_progress_callback(fastboot_timed_send_info);
+
net_set_udp_handler(fastboot_handler);
/* zero out server ether in case the server ip has changed */