Commit 6cf721a0 authored by Russell King's avatar Russell King

[SERIAL] Pass device pointer through to tty_register_device.

This allows drivers to pass their struct device through to
tty_register_device, which in turn allows sysfs to show which
device and driver owns the UART.
parent 6503adce
...@@ -2227,7 +2227,7 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port) ...@@ -2227,7 +2227,7 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port)
* Register the port whether it's detected or not. This allows * Register the port whether it's detected or not. This allows
* setserial to be used to alter this ports parameters. * setserial to be used to alter this ports parameters.
*/ */
tty_register_device(drv->tty_driver, port->line, NULL); tty_register_device(drv->tty_driver, port->line, port->dev);
out: out:
up(&port_sem); up(&port_sem);
......
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
struct uart_port; struct uart_port;
struct uart_info; struct uart_info;
struct serial_struct; struct serial_struct;
struct device;
/* /*
* This structure describes all the operations that can be * This structure describes all the operations that can be
...@@ -218,6 +219,7 @@ struct uart_port { ...@@ -218,6 +219,7 @@ struct uart_port {
unsigned int custom_divisor; unsigned int custom_divisor;
unsigned int line; /* port index */ unsigned int line; /* port index */
unsigned long mapbase; /* for ioremap */ unsigned long mapbase; /* for ioremap */
struct device *dev; /* parent device */
unsigned char hub6; /* this should be in the 8250 driver */ unsigned char hub6; /* this should be in the 8250 driver */
unsigned char unused[3]; unsigned char unused[3];
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment