drivers: uart_pl011: Fix compilation when CONFIG_UART_INTERRUPT_DRIVEN=n

The driver fails to compile when CONFIG_UART_INTERRUPT_DRIVEN=n. This is
due to a nested ifdef on CONFIG_UART_INTERRUPT_DRIVEN that is excluding
pieces of code unrelated to the uart interrupts management.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
Carlo Caione 2019-10-05 17:47:27 +01:00 committed by Andrew Boie
commit 26ff7603f1

View file

@ -327,6 +327,7 @@ static void pl011_irq_callback_set(struct device *dev,
DEV_DATA(dev)->irq_cb = cb;
DEV_DATA(dev)->irq_cb_data = cb_data;
}
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
static const struct uart_driver_api pl011_driver_api = {
.poll_in = pl011_poll_in,
@ -392,6 +393,8 @@ static int pl011_init(struct device *dev)
return 0;
}
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
void pl011_isr(void *arg)
{
struct device *dev = arg;