]> git.baikalelectronics.ru Git - kernel.git/commit
serial: sh-sci: Fix HSCIF RX sampling point adjustment
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 29 Mar 2019 09:10:26 +0000 (10:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Apr 2019 13:24:38 +0000 (15:24 +0200)
commitaae9b10f4764d886fcb385646c756e37f265df30
tree73e77a37beb9fae246d32f8e0bccf51f5436c4f5
parentfb84cd0a1a6b997c884b488ec45392abb9334902
serial: sh-sci: Fix HSCIF RX sampling point adjustment

The calculation of the sampling point has min() and max() exchanged.
Fix this by using the clamp() helper instead.

Fixes: 3a05ba7b74dfebb5 ("serial: sh-sci: Support for HSCIF RX sampling point adjustment")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c