提交 9e191b22 编写于 作者: G Grant Likely

dt: remove of_alias_get_id() reference

of_alias_get_id() is broken and being reverted.  Remove the reference
to it and replace with a single incrementing id number.

There is no risk of regression here on the imx driver since the imx
change to use of_alias_get_id() is commit 22698aa2, "serial/imx: add
device tree probe support" which is new for v3.1, and it won't get
used unless CONFIG_OF is enabled and the board is booted using a
device tree.  A single incrementing integer is sufficient for now.
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
Acked-by: NShawn Guo <shawn.guo@linaro.org>
上级 750f463a
...@@ -1286,22 +1286,17 @@ static int serial_imx_resume(struct platform_device *dev) ...@@ -1286,22 +1286,17 @@ static int serial_imx_resume(struct platform_device *dev)
static int serial_imx_probe_dt(struct imx_port *sport, static int serial_imx_probe_dt(struct imx_port *sport,
struct platform_device *pdev) struct platform_device *pdev)
{ {
static int portnum = 0;
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
const struct of_device_id *of_id = const struct of_device_id *of_id =
of_match_device(imx_uart_dt_ids, &pdev->dev); of_match_device(imx_uart_dt_ids, &pdev->dev);
int ret;
if (!np) if (!np)
return -ENODEV; return -ENODEV;
ret = of_alias_get_id(np, "serial"); sport->port.line = portnum++;
if (ret < 0) { if (sport->port.line >= UART_NR)
pr_err("%s: failed to get alias id, errno %d\n", return -EINVAL;
__func__, ret);
return -ENODEV;
} else {
sport->port.line = ret;
}
if (of_get_property(np, "fsl,uart-has-rtscts", NULL)) if (of_get_property(np, "fsl,uart-has-rtscts", NULL))
sport->have_rtscts = 1; sport->have_rtscts = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册