You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07: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:
committed by
Greg Kroah-Hartman
parent
380c966c09
commit
b1261c86fe
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user