From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Abraham Date: Sat, 23 Apr 2016 22:18:10 +0530 Subject: [U-Boot] [PATCH v3 4/8] serial: s5p: get the port id number from the alias of the device node In-Reply-To: <1461430094-5186-1-git-send-email-ta.omasab@gmail.com> References: <1461430094-5186-1-git-send-email-ta.omasab@gmail.com> Message-ID: <1461430094-5186-5-git-send-email-ta.omasab@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Thomas Abraham 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 --- drivers/serial/serial_s5p.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index feba467..8590dfd 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; } -- 1.6.6.rc2