Signed-off-by: Antony Pavlov <antonynpavlov@xxxxxxxxx> --- drivers/serial/serial_ns16550.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c index 6a3c865..5899d57 100644 --- a/drivers/serial/serial_ns16550.c +++ b/drivers/serial/serial_ns16550.c @@ -266,8 +266,6 @@ static int ns16550_probe(struct device_d *dev) else ns16550_probe_dt(dev, priv); - cdev = &priv->cdev; - if (!plat || !plat->clock) { priv->clk = clk_get(dev, NULL); if (IS_ERR(priv->clk)) { @@ -291,6 +289,7 @@ static int ns16550_probe(struct device_d *dev) priv->access_width = dev->resource[0].flags & IORESOURCE_MEM_TYPE_MASK; + cdev = &priv->cdev; cdev->dev = dev; cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR; cdev->tstc = ns16550_tstc; -- 1.8.3.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox