|
@@ -2916,6 +2916,24 @@ static struct uart_ops serial8250_pops = {
|
|
|
|
|
|
static struct uart_8250_port serial8250_ports[UART_NR];
|
|
static struct uart_8250_port serial8250_ports[UART_NR];
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * serial8250_get_port - retrieve struct uart_8250_port
|
|
|
|
+ * @line: serial line number
|
|
|
|
+ *
|
|
|
|
+ * This function retrieves struct uart_8250_port for the specific line.
|
|
|
|
+ * This struct *must* *not* be used to perform a 8250 or serial core operation
|
|
|
|
+ * which is not accessible otherwise. Its only purpose is to make the struct
|
|
|
|
+ * accessible to the runtime-pm callbacks for context suspend/restore.
|
|
|
|
+ * The lock assumption made here is none because runtime-pm suspend/resume
|
|
|
|
+ * callbacks should not be invoked if there is any operation performed on the
|
|
|
|
+ * port.
|
|
|
|
+ */
|
|
|
|
+struct uart_8250_port *serial8250_get_port(int line)
|
|
|
|
+{
|
|
|
|
+ return &serial8250_ports[line];
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL_GPL(serial8250_get_port);
|
|
|
|
+
|
|
static void (*serial8250_isa_config)(int port, struct uart_port *up,
|
|
static void (*serial8250_isa_config)(int port, struct uart_port *up,
|
|
unsigned short *capabilities);
|
|
unsigned short *capabilities);
|
|
|
|
|