Re: [PATCH v3] USB: serial: xr: Add TIOCGRS485 and TIOCSRS485 ioctls

From: Johan Hovold
Date: Thu Apr 13 2023 - 05:00:03 EST


On Tue, Mar 14, 2023 at 08:37:30AM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 14, 2023 at 09:00:01AM +0200, Jarkko Sonninen wrote:
> > Add support for RS-485 in Exar USB adapters.
> > RS-485 mode is controlled by TIOCGRS485 and TIOCSRS485 ioctls.
> > Gpio mode register is set to enable RS-485.
> >
> > Signed-off-by: Jarkko Sonninen <kasper@xxxxxx>
> > ---

> > @@ -237,6 +238,7 @@ static const struct xr_type xr_types[] = {
> > struct xr_data {
> > const struct xr_type *type;
> > u8 channel; /* zero-based index or interface number */
> > + u32 rs485_flags;
>
> Nit, you might want to move this up above channel as you now have a hole
> in this structure. Not like it's that big of a deal so if you don't
> have to respin this no need to change.

Generally, it's better to keep related fields together than worry about
holes so the above is just fine.

Johan