Re: [PATCH v7 4/6] serial: take termios_rwsem for .rs485_config() & pass termios as param

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

 



On Wed, 15 Jun 2022, Andy Shevchenko wrote:

> On Wed, Jun 15, 2022 at 03:48:27PM +0300, Ilpo Järvinen wrote:
> > To be able to alter ADDRB within .rs485_config(), take termios_rwsem
> > before calling .rs485_config() and pass termios.
> 
> I would use ->rs485_config() as a reference to the callback.
> 
> ...
> 
> > -	ret = port->rs485_config(port, rs485);
> > +	ret = port->rs485_config(port, rs485, NULL);
> 
> > +
> 
> Stray change?

Yes it was.

> >  	if (ret)
> >  		memset(rs485, 0, sizeof(*rs485));
> 
> ...
> 
> >  	void			(*handle_break)(struct uart_port *);
> >  	int			(*rs485_config)(struct uart_port *,
> > -						struct serial_rs485 *rs485);
> > +						struct serial_rs485 *rs485,
> > +						struct ktermios *termios);
> 
> Dunno if termios has to be second parameter. The idea is to pass input data
> followed by (auxiliary) output as usual pattern.

I guess I can make termios 2nd param.

-- 
 i.

[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