Messages in this thread | | | Date | Tue, 9 Jun 2009 16:01:32 +0100 | From | Alan Cox <> | Subject | Re: [PATCH 8/8] imx: serial: add IrDA support to serial driver |
| |
> +#ifdef CONFIG_IRDA > +#define USE_IRDA(sport) ((sport)->use_irda) > +#else > +#define USE_IRDA(sport) (0) > +#endif > +
You define this but only use it in about half the cases ?
> +#ifdef CONFIG_IRDA > + if (sport->use_irda) { > + /* half duplex - wait for end of transmission */ > + int n = 256;
Otherwise this series looks sound.
While you are fiddling with the baud rate the driver really should work out the resulting actual baud rate and call
tty_encode_baud_rate(tty, in-rate, out-rate);
that will report back the resulting rate and knows how to encode all the termios fields as well as reporting close values to the requested speed as the speed requested (eg if you ask for B38400 and it tries to encode 38215 or similar it will encode back B38400)
Alan
| |