From c620f4836e0035ed36d13f2e44f9097ec7ae700d Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 19 Dec 2022 12:07:51 -0500 Subject: [PATCH] canserial: Only call bootloader_request() if CONFIG_HAVE_BOOTLOADER_REQUEST Signed-off-by: Kevin O'Connor --- src/generic/canserial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generic/canserial.c b/src/generic/canserial.c index fa46a6d2..0607e489 100644 --- a/src/generic/canserial.c +++ b/src/generic/canserial.c @@ -7,6 +7,7 @@ // This file may be distributed under the terms of the GNU GPLv3 license. #include // memcpy +#include "autoconf.h" // CONFIG_HAVE_BOOTLOADER_REQUEST #include "board/io.h" // readb #include "board/irq.h" // irq_save #include "board/misc.h" // console_sendf @@ -185,7 +186,7 @@ can_process_set_klipper_nodeid(struct canbus_msg *msg) static void can_process_request_bootloader(struct canbus_msg *msg) { - if (!can_check_uuid(msg)) + if (!CONFIG_HAVE_BOOTLOADER_REQUEST || !can_check_uuid(msg)) return; bootloader_request(); }