Skip to content

Commit e8bfc03

Browse files
de-nordicnvlsianpu
authored andcommitted
zephyr: Fix serial recovery compilation warnings
Missing const on pointers to device structures caused compilation warnings when compiling bootloader with serial recovery enabled. Signed-off-by: Dominik Ermel <[email protected]>
1 parent a5d79cf commit e8bfc03

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

boot/zephyr/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ void main(void)
317317

318318
#ifdef CONFIG_MCUBOOT_SERIAL
319319

320-
struct device *detect_port;
320+
struct device const *detect_port;
321321
uint32_t detect_value = !CONFIG_BOOT_SERIAL_DETECT_PIN_VAL;
322322

323323
detect_port = device_get_binding(CONFIG_BOOT_SERIAL_DETECT_PORT);

boot/zephyr/serial_adapter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct line_input {
4141
char line[CONFIG_BOOT_MAX_LINE_INPUT_LEN];
4242
};
4343

44-
static struct device *uart_dev;
44+
static struct device const *uart_dev;
4545
static struct line_input line_bufs[2];
4646

4747
static sys_slist_t avail_queue;
@@ -115,7 +115,7 @@ boot_console_init(void)
115115
}
116116

117117
static void
118-
boot_uart_fifo_callback(struct device *dev, void *user_data)
118+
boot_uart_fifo_callback(const struct device *dev, void *user_data)
119119
{
120120
static struct line_input *cmd;
121121
uint8_t byte;

0 commit comments

Comments
 (0)