summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-10-23 22:26:06 +0900
committerSimon Glass <sjg@chromium.org>2014-10-23 21:43:08 -0600
commitbac644675ac900e27dc079cf062b55fa71a4c211 (patch)
treefe3412a00da761d28dc9fea814ec65f6f5259793 /drivers
parent3fdd0bb2b0dc20f192e9ea8682d5c18f37daadc1 (diff)
downloadu-boot-imx-bac644675ac900e27dc079cf062b55fa71a4c211.zip
u-boot-imx-bac644675ac900e27dc079cf062b55fa71a4c211.tar.gz
u-boot-imx-bac644675ac900e27dc079cf062b55fa71a4c211.tar.bz2
dm: serial: fix console putc
Commit b8893327e9d2 (dm: serial: Put common code into separate functions) consolidated getc() correctly, but introduced another bug to putc(); serial_stub_putc() passes sdev->priv to serial_putc_dev(), but serial_putc_dev() uses cur_dev instead of the given argument. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/serial-uclass.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index c9383dc..6b41e0b 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -85,14 +85,14 @@ void serial_initialize(void)
static void serial_putc_dev(struct udevice *dev, char ch)
{
- struct dm_serial_ops *ops = serial_get_ops(cur_dev);
+ struct dm_serial_ops *ops = serial_get_ops(dev);
int err;
do {
- err = ops->putc(cur_dev, ch);
+ err = ops->putc(dev, ch);
} while (err == -EAGAIN);
if (ch == '\n')
- serial_putc('\r');
+ serial_putc_dev(dev, '\r');
}
void serial_putc(char ch)