diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2016-09-30 17:37:00 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-06 10:31:59 -0400 |
commit | ab895d6af224a427db4ffb70884588a2449be1c6 (patch) | |
tree | 0964db9464a8f880ac6227e688a547e63bb449ff /drivers | |
parent | 53fec162061811a73c7dab3207f8fdb2343ae289 (diff) |
serial: ns16550: Handle -ENOENT when requesting clock
When calling clk_get_by_index(), fall back to the legacy method of
getting the clock if -ENOENT is returned.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/ns16550.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 765499dab6..29d547166b 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -408,7 +408,7 @@ int ns16550_serial_ofdata_to_platdata(struct udevice *dev) err = clk_get_rate(&clk); if (!IS_ERR_VALUE(err)) plat->clock = err; - } else if (err != -ENODEV && err != -ENOSYS) { + } else if (err != -ENOENT && err != -ENODEV && err != -ENOSYS) { debug("ns16550 failed to get clock\n"); return err; } |