Skip to contentSkip to conversation

serial: ns16550: Handle -ENOENT when requesting clock

PATCH In review Alexandre Courbot 4 participants 5 messages Sep 30, 2016 – Oct 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/serial/ns16550.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/ns16550.c +1 -1
index 765499dab646..29d547166b90 100644
@@ -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;
 	}
Signature · 1 line
2.10.0
#1 lore raw

PATCH 1/1 serial: ns16550: Handle -ENOENT when requesting clock

Quoted 2 lines · Alexandre Courbot

When calling clk_get_by_index(), fall back to the legacy method of getting the clock if -ENOENT is returned.

Withdrawing this patch as Thierry sent a better version of it.

#3 lore raw

PATCH 1/1 serial: ns16550: Handle -ENOENT when requesting clock

Quoted 5 lines · Stephen Warren
Quoted 2 lines · Alexandre Courbot

When calling clk_get_by_index(), fall back to the legacy method of getting the clock if -ENOENT is returned.

Agreed, this looks like the more correct fix in retrospect.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161004/38ceb2d4/attachment.sig>

#4 lore raw
In reply to Alexandre Courbot
Quoted 6 lines · Alexandre Courbot

When calling clk_get_by_index(), fall back to the legacy method of getting the clock if -ENOENT is returned.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161006/87b6abb9/attachment.sig>