@@ -98,7 +98,9 @@ struct omap_uart_state {
#endif
};
-static LIST_HEAD(uart_list);
+static LIST_HEAD(hwmod_list); /* list of detected UART hwmods */
+static LIST_HEAD(uart_list); /* list of initialized UARTs */
+
static u8 num_uarts;
static struct omap_device_pm_latency omap_uart_latency[] = {
@@ -612,7 +614,7 @@ static int omap_serial_port_init(struct omap_hwmod *oh, void *user)
uart->oh = oh;
uart->num = i++;
- list_add_tail(&uart->node, &uart_list);
+ list_add_tail(&uart->node, &hwmod_list);
num_uarts++;
/*
@@ -676,7 +678,7 @@ void __init omap_serial_init_port(int port)
if (WARN_ON(port >= num_uarts))
return;
- list_for_each_entry(uart, &uart_list, node)
+ list_for_each_entry(uart, &hwmod_list, node)
if (port == uart->num)
break;
@@ -789,6 +791,8 @@ void __init omap_serial_init_port(int port)
device_init_wakeup(&od->pdev.dev, true);
DEV_CREATE_FILE(&od->pdev.dev, &dev_attr_sleep_timeout);
}
+
+ list_add_tail(&uart->node, &uart_list);
}
/**