[U-Boot] [PATCH v2 3/8] dm: serial: remove unnecessary casting
Masahiro Yamada
yamada.m at jp.panasonic.com
Thu Oct 23 15:26:07 CEST 2014
The type (void *) can be directly passed to a function that
takes a specific pointer type.
Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
---
Changes in v2:
- Rebase
drivers/serial/serial-uclass.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index f2bc4d8..5767312 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -135,9 +135,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)
@@ -148,9 +146,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)
--
1.9.1
More information about the U-Boot
mailing list