Re: drivers/char/specialix.c: broken baud conversion

From: Rogier Wolff
Date: Mon Oct 09 2006 - 02:52:52 EST


On Mon, Oct 09, 2006 at 12:18:19AM +0200, Adrian Bunk wrote:
> + if (baud == 38400) {
> if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
> baud ++;
> if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
> baud += 2;
> }
>
> Increasing the index for baud_table[] by 1 or 2 is quite different from
> increasing baud by 1 or 2.

In that range,
baud <<= 1;
and
baud <<= 2;

should work.

Roger.

--
** R.E.Wolff@xxxxxxxxxxxx ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
Does it sit on the couch all day? Is it unemployed? Please be specific!
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ
-
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/