uart: microchip: fix build error with PM_DEVICE=n

Fix a build error when the driver is built with:

CONFIG_PM=y
CONFIG_PM_DEVICE=n
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_CONSOLE_INPUT_EXPIRED=y

due to uart_xec_pm_policy_state_lock_get() and rx_refresh_timeout_work()
declared under different configuration options.

Fixes: 343d1919f1 "uart: microchip: add low power & wake support"
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
Fabio Baltieri 2023-01-30 13:06:17 +00:00 committed by Fabio Baltieri
commit 20644536b9

View file

@ -915,7 +915,7 @@ static void uart_xec_irq_callback_set(const struct device *dev,
static void uart_xec_isr(const struct device *dev)
{
struct uart_xec_dev_data * const dev_data = dev->data;
#ifdef CONFIG_UART_CONSOLE_INPUT_EXPIRED
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_UART_CONSOLE_INPUT_EXPIRED)
const struct uart_xec_device_config * const dev_cfg = dev->config;
struct uart_regs *regs = dev_cfg->regs;
int rx_ready = 0;