Commit 20644536 authored by Fabio Baltieri's avatar Fabio Baltieri Committed by Fabio Baltieri
Browse files

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: 343d1919 "uart: microchip: add low power & wake support"
Signed-off-by: default avatarFabio Baltieri <fabiobaltieri@google.com>
parent 842a6ba0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;