From df612d35c2e463732981c3895a3d221347b5b8f8 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Tue, 7 Dec 2004 07:09:56 +0000 Subject: [PATCH] libftdi: (tomj) small improvement to the baudrate calculation code --- ChangeLog | 1 + src/ftdi.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5893ab5..47c801c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ New in 0.6 ---------- +* Small improvement to the baudrate calculation code (Emil) * Error handling cleanup (Rogier Wolff) * Fix for kernel 2.6 USB subsystem. Detects kernel at runtime. diff --git a/src/ftdi.c b/src/ftdi.c index 1ee86eb..abe0a5c 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -269,7 +269,7 @@ static int ftdi_convert_baudrate(int baudrate, struct ftdi_context *ftdi, int baud_diff; // Round up to supported divisor value - if (try_divisor < 8) { + if (try_divisor <= 8) { // Round up to minimum supported divisor try_divisor = 8; } else if (ftdi->type != TYPE_AM && try_divisor < 12) { -- 1.7.1