From 7c8b6498e30911bebb9b5544eab7dd73d81461f6 Mon Sep 17 00:00:00 2001 From: Marcus Shawcroft Date: Mon, 24 Oct 2016 08:37:56 +0100 Subject: [PATCH] serial/uart_ns16550: Make driver_api structure const. Change-Id: Ie27216f1020504d8c6368d228e2e8e94da8fa51f Signed-off-by: Marcus Shawcroft --- drivers/serial/uart_ns16550.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/serial/uart_ns16550.c b/drivers/serial/uart_ns16550.c index 20cbeb2f9fc..fad831dfb01 100644 --- a/drivers/serial/uart_ns16550.c +++ b/drivers/serial/uart_ns16550.c @@ -233,7 +233,7 @@ struct uart_ns16550_dev_data_t { #endif }; -static struct uart_driver_api uart_ns16550_driver_api; +static const struct uart_driver_api uart_ns16550_driver_api; #ifdef CONFIG_UART_NS16550_DLF static inline void set_dlf(struct device *dev, uint32_t val) @@ -710,7 +710,7 @@ static int uart_ns16550_drv_cmd(struct device *dev, uint32_t cmd, uint32_t p) #endif /* CONFIG_UART_NS16550_DRV_CMD */ -static struct uart_driver_api uart_ns16550_driver_api = { +static const struct uart_driver_api uart_ns16550_driver_api = { .poll_in = uart_ns16550_poll_in, .poll_out = uart_ns16550_poll_out, .err_check = uart_ns16550_err_check, @@ -779,7 +779,7 @@ static struct uart_ns16550_dev_data_t uart_ns16550_dev_data_0 = { DEVICE_AND_API_INIT(uart_ns16550_0, CONFIG_UART_NS16550_PORT_0_NAME, &uart_ns16550_init, &uart_ns16550_dev_data_0, &uart_ns16550_dev_cfg_0, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, - (void *)&uart_ns16550_driver_api); + &uart_ns16550_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void irq_config_func_0(struct device *dev) @@ -831,7 +831,7 @@ static struct uart_ns16550_dev_data_t uart_ns16550_dev_data_1 = { DEVICE_AND_API_INIT(uart_ns16550_1, CONFIG_UART_NS16550_PORT_1_NAME, &uart_ns16550_init, &uart_ns16550_dev_data_1, &uart_ns16550_dev_cfg_1, PRIMARY, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, - (void *)&uart_ns16550_driver_api); + &uart_ns16550_driver_api); #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void irq_config_func_1(struct device *dev)