MLK-17491-2 serial: fsl_lpuart: improve the baud setting algorithm
authorDong Aisheng <aisheng.dong@nxp.com>
Tue, 5 Sep 2017 08:31:50 +0000 (16:31 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:54:21 +0000 (14:54 -0500)
commit685401356afb12cbe8c2102fad49565e25cdce40
treeef3bbfccb5827c2c7dc6adcdd00c529ea707163b
parentd82a8a4a2dbef1d5bd472362c70f5c52170704ed
MLK-17491-2 serial: fsl_lpuart: improve the baud setting algorithm

If "baud_diff == 0", it means we already found the exact matching baud
rate and no need try looping the left possible baud rates anymore.

So in this patch, we break out immediately once we find the right baud
rate to avoid the left meaningless loops.

Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
drivers/tty/serial/fsl_lpuart.c