From afb51d2750be7dfdb9340f1e71d9e4cbebe1d3ba Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Thu, 5 Mar 2020 16:15:16 +0900 Subject: [PATCH] drivers: serial: usart_sam: Fix irq_update API function The `irq_update` UART API function must always return 1 according to the API documentations. This commit fixes the `irq_update` API function to unconditionally return '1'. Signed-off-by: Stephanos Ioannidis --- drivers/serial/usart_sam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/serial/usart_sam.c b/drivers/serial/usart_sam.c index cd645e0a3b..a48494f185 100644 --- a/drivers/serial/usart_sam.c +++ b/drivers/serial/usart_sam.c @@ -300,9 +300,9 @@ static int usart_sam_irq_is_pending(struct device *dev) static int usart_sam_irq_update(struct device *dev) { - volatile Usart * const usart = DEV_CFG(dev)->regs; + ARG_UNUSED(dev); - return (usart->US_CSR & US_CSR_TXEMPTY); + return 1; } static void usart_sam_irq_callback_set(struct device *dev,