mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
term/serial: Avoid double lookup of serial ports
The various functions to add a port used to return port->name, and the callers would immediately iterate all registered ports to "find" the one just created by comparing that return value with ... port->name. This is a waste of cycles and code. Instead, have those functions return "port" directly. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
b73a44b281
commit
e37dbba665
6 files changed
+33
-45
No files matched your search
@@ -24,7 +24,7 @@
|
||||
#include <grub/dl.h>
|
||||
#include <grub/acpi.h>
|
||||
|
||||
char *
|
||||
struct grub_serial_port *
|
||||
grub_ns8250_spcr_init (void)
|
||||
{
|
||||
struct grub_acpi_spcr *spcr;
|
||||
|
||||
Reference in new issue
Block a user