From: Thomas Abraham Date: Sat, 23 Apr 2016 16:48:10 +0000 (+0530) Subject: serial: s5p: get the port id number from the alias of the device node X-Git-Tag: v2016.07-rc1~1^2~31 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5ab6c4df27c9188251ff43a536c90ede57ba48fe;p=u-boot serial: s5p: get the port id number from the alias of the device node The port id, if not specified in the device node, can be obtained from the alias of the device node listed in the aliases node. Cc: Minkyu Kang Signed-off-by: Thomas Abraham Reviewed-by: Simon Glass Signed-off-by: Minkyu Kang --- diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index feba467d80..8590dfd418 100644 --- a/drivers/serial/serial_s5p.c +++ b/drivers/serial/serial_s5p.c @@ -174,8 +174,8 @@ static int s5p_serial_ofdata_to_platdata(struct udevice *dev) return -EINVAL; plat->reg = (struct s5p_uart *)addr; - plat->port_id = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "id", -1); - + plat->port_id = fdtdec_get_int(gd->fdt_blob, dev->of_offset, + "id", dev->seq); return 0; }