Skip to content

Commit 29c9b91

Browse files
pdgendtfabiobaltieri
authored andcommitted
drivers: serial: Place API into iterable section
Add wrapper DEVICE_API macro to all uart_driver_api instances. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent 84a3d1f commit 29c9b91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+80
-80
lines changed

drivers/serial/leuart_gecko.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ static int leuart_gecko_init(const struct device *dev)
295295
return 0;
296296
}
297297

298-
static const struct uart_driver_api leuart_gecko_driver_api = {
298+
static DEVICE_API(uart, leuart_gecko_driver_api) = {
299299
.poll_in = leuart_gecko_poll_in,
300300
.poll_out = leuart_gecko_poll_out,
301301
.err_check = leuart_gecko_err_check,

drivers/serial/serial_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ static int serial_vnd_rx_enable(const struct device *dev, uint8_t *read_buf, siz
426426
}
427427
#endif /* CONFIG_UART_ASYNC_API */
428428

429-
static const struct uart_driver_api serial_vnd_api = {
429+
static DEVICE_API(uart, serial_vnd_api) = {
430430
.poll_in = serial_vnd_poll_in,
431431
.poll_out = serial_vnd_poll_out,
432432
.err_check = serial_vnd_err_check,

drivers/serial/uart_altera.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ static int uart_altera_drv_cmd(const struct device *dev, uint32_t cmd,
901901

902902
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
903903

904-
static const struct uart_driver_api uart_altera_driver_api = {
904+
static DEVICE_API(uart, uart_altera_driver_api) = {
905905
.poll_in = uart_altera_poll_in,
906906
.poll_out = uart_altera_poll_out,
907907
.err_check = uart_altera_err_check,

drivers/serial/uart_altera_jtag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ static void uart_altera_jtag_isr(const struct device *dev)
514514

515515
#endif /* CONFIG_UART_INTERRUPT_DRIVEN && !CONFIG_UART_ALTERA_JTAG_HAL */
516516

517-
static const struct uart_driver_api uart_altera_jtag_driver_api = {
517+
static DEVICE_API(uart, uart_altera_jtag_driver_api) = {
518518
#ifndef CONFIG_UART_ALTERA_JTAG_HAL
519519
.poll_in = uart_altera_jtag_poll_in,
520520
#endif /* CONFIG_UART_ALTERA_JTAG_HAL */

drivers/serial/uart_apbuart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ static int apbuart_init(const struct device *dev)
516516
}
517517

518518
/* Driver API defined in uart.h */
519-
static const struct uart_driver_api apbuart_driver_api = {
519+
static DEVICE_API(uart, apbuart_driver_api) = {
520520
.poll_in = apbuart_poll_in,
521521
.poll_out = apbuart_poll_out,
522522
.err_check = apbuart_err_check,

drivers/serial/uart_b91.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ static void uart_b91_irq_callback_set(const struct device *dev,
522522

523523
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
524524

525-
static const struct uart_driver_api uart_b91_driver_api = {
525+
static DEVICE_API(uart, uart_b91_driver_api) = {
526526
.poll_in = uart_b91_poll_in,
527527
.poll_out = uart_b91_poll_out,
528528
.err_check = uart_b91_err_check,

drivers/serial/uart_bcm2711.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ void uart_isr(const struct device *dev)
275275
}
276276
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
277277

278-
static const struct uart_driver_api uart_bcm2711_driver_api = {
278+
static DEVICE_API(uart, uart_bcm2711_driver_api) = {
279279
.poll_in = uart_bcm2711_poll_in,
280280
.poll_out = uart_bcm2711_poll_out,
281281

drivers/serial/uart_bt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static void uart_bt_irq_callback_set(const struct device *dev,
289289
dev_data->uart.callback.cb_data = cb_data;
290290
}
291291

292-
static const struct uart_driver_api uart_bt_driver_api = {
292+
static DEVICE_API(uart, uart_bt_driver_api) = {
293293
.poll_in = uart_bt_poll_in,
294294
.poll_out = uart_bt_poll_out,
295295
.fifo_fill = uart_bt_fifo_fill,

drivers/serial/uart_cc13xx_cc26xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static int uart_cc13xx_cc26xx_pm_action(const struct device *dev,
464464
}
465465
#endif /* CONFIG_PM_DEVICE */
466466

467-
static const struct uart_driver_api uart_cc13xx_cc26xx_driver_api = {
467+
static DEVICE_API(uart, uart_cc13xx_cc26xx_driver_api) = {
468468
.poll_in = uart_cc13xx_cc26xx_poll_in,
469469
.poll_out = uart_cc13xx_cc26xx_poll_out,
470470
.err_check = uart_cc13xx_cc26xx_err_check,

drivers/serial/uart_cc32xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static void uart_cc32xx_isr(const struct device *dev)
290290
}
291291
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
292292

293-
static const struct uart_driver_api uart_cc32xx_driver_api = {
293+
static DEVICE_API(uart, uart_cc32xx_driver_api) = {
294294
.poll_in = uart_cc32xx_poll_in,
295295
.poll_out = uart_cc32xx_poll_out,
296296
.err_check = uart_cc32xx_err_check,

0 commit comments

Comments
 (0)