serial: usbtty: Fix puts function
authorPali Rohár <pali@kernel.org>
Sun, 7 Feb 2021 13:50:01 +0000 (14:50 +0100)
committerMarek Vasut <marex@denx.de>
Wed, 3 Mar 2021 03:12:45 +0000 (04:12 +0100)
commitd3fb8fee7d8225845cedfd0b9d23b2a8d6f8c6ee
treef03d0af72e50c544a089f500d14df4671f1ec464
parent78af81c345430a9088235f48d302922955d2499f
serial: usbtty: Fix puts function

This function has incorrect implementation of prepending CR prior LF.
Without this patch it prepended CR prior whole string which is going to be
written and let LF without leading CR. Fix this issue by inserting CR at
correct place to make output on usbtty serial console more readable.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
drivers/serial/usbtty.c