Re: [PATCH 8/8] imx: serial: add IrDA support to serial driver
From: Alan Cox
Date: Tue Jun 09 2009 - 11:01:30 EST
> +#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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/