mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
serial: 8250: introduce up_to_u8250p() helper
It helps to cast struct uart_port to struct uart_8250_port at runtime. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
380c966c09
commit
b1261c86fe
5 changed files with 32 additions and 47 deletions
|
@ -100,6 +100,11 @@ struct uart_8250_port {
|
|||
void (*dl_write)(struct uart_8250_port *, int);
|
||||
};
|
||||
|
||||
static inline struct uart_8250_port *up_to_u8250p(struct uart_port *up)
|
||||
{
|
||||
return container_of(up, struct uart_8250_port, port);
|
||||
}
|
||||
|
||||
int serial8250_register_8250_port(struct uart_8250_port *);
|
||||
void serial8250_unregister_port(int line);
|
||||
void serial8250_suspend_port(int line);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue