Re: [PATCH v3 2/3] serial: 8250: Expose set_ldisc function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 31, 2016 at 05:26:46PM +0000, Ed Blake wrote:
> Expose set_ldisc() function so that it can be overridden with a
> platform specific implementation.
> 
> Signed-off-by: Ed Blake <ed.blake@xxxxxxxxxx>
> ---
>  drivers/tty/serial/8250/8250_core.c |  3 +++
>  drivers/tty/serial/8250/8250_port.c | 12 ++++++++++--
>  include/linux/serial_8250.h         |  4 ++++
>  include/linux/serial_core.h         |  2 ++
>  4 files changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
> index 8a4d53a..2b6dd3f 100644
> --- a/drivers/tty/serial/8250/8250_core.c
> +++ b/drivers/tty/serial/8250/8250_core.c
> @@ -830,6 +830,7 @@ static int serial8250_probe(struct platform_device *dev)
>  		uart.port.handle_irq	= p->handle_irq;
>  		uart.port.handle_break	= p->handle_break;
>  		uart.port.set_termios	= p->set_termios;
> +		uart.port.set_ldisc	= p->set_ldisc;
>  		uart.port.get_mctrl	= p->get_mctrl;
>  		uart.port.pm		= p->pm;
>  		uart.port.dev		= &dev->dev;
> @@ -1023,6 +1024,8 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
>  		/*  Possibly override set_termios call */
>  		if (up->port.set_termios)
>  			uart->port.set_termios = up->port.set_termios;
> +		if (up->port.set_ldisc)
> +			uart->port.set_ldisc = up->port.set_ldisc;
>  		if (up->port.get_mctrl)
>  			uart->port.get_mctrl = up->port.get_mctrl;
>  		if (up->port.set_mctrl)
> diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
> index 1bfb6fd..38c5856 100644
> --- a/drivers/tty/serial/8250/8250_port.c
> +++ b/drivers/tty/serial/8250/8250_port.c
> @@ -2690,8 +2690,7 @@ static unsigned int serial8250_get_baud_rate(struct uart_port *port,
>  		serial8250_do_set_termios(port, termios, old);
>  }
>  
> -static void
> -serial8250_set_ldisc(struct uart_port *port, struct ktermios *termios)
> +void serial8250_do_set_ldisc(struct uart_port *port, struct ktermios *termios)
>  {
>  	if (termios->c_line == N_PPS) {
>  		port->flags |= UPF_HARDPPS_CD;
> @@ -2707,7 +2706,16 @@ static unsigned int serial8250_get_baud_rate(struct uart_port *port,
>  		}
>  	}
>  }
> +EXPORT_SYMBOL(serial8250_do_set_ldisc);

EXPORT_SYMBOL_GPL()?  (I have to ask...)

And who is going to use this?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux