9
0
Fork 0

serial: ns16550: fill cdev just-in-time

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Antony Pavlov 2013-07-23 19:28:02 +04:00 committed by Sascha Hauer
parent fe290ec08f
commit f9ae3fb01c
1 changed files with 1 additions and 2 deletions

View File

@ -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;