summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-10-23 22:26:07 +0900
committerSimon Glass <sjg@chromium.org>2014-10-23 21:43:08 -0600
commit52a0a6f0dcd662c5069737687d53d8bfb1e17bfb (patch)
tree737c7ea94d532db19d946c4087823ce04b14d684 /drivers/serial
parentbac644675ac900e27dc079cf062b55fa71a4c211 (diff)
downloadu-boot-imx-52a0a6f0dcd662c5069737687d53d8bfb1e17bfb.zip
u-boot-imx-52a0a6f0dcd662c5069737687d53d8bfb1e17bfb.tar.gz
u-boot-imx-52a0a6f0dcd662c5069737687d53d8bfb1e17bfb.tar.bz2
dm: serial: remove unnecessary casting
The type (void *) can be directly passed to a function that takes a specific pointer type. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial-uclass.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 6b41e0b..8bea715 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -149,9 +149,7 @@ void serial_stdio_init(void)
static void serial_stub_putc(struct stdio_dev *sdev, const char ch)
{
- struct udevice *dev = sdev->priv;
-
- serial_putc_dev(dev, ch);
+ serial_putc_dev(sdev->priv, ch);
}
void serial_stub_puts(struct stdio_dev *sdev, const char *str)
@@ -162,9 +160,7 @@ void serial_stub_puts(struct stdio_dev *sdev, const char *str)
int serial_stub_getc(struct stdio_dev *sdev)
{
- struct udevice *dev = sdev->priv;
-
- return serial_getc_dev(dev);
+ return serial_getc_dev(sdev->priv);
}
int serial_stub_tstc(struct stdio_dev *sdev)