[OpenBIOS] [PATCH 5/5] usbhid: fix up keyboard alias for USB keyboards

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Tue Jun 12 18:02:12 CEST 2018


A USB keyboard is not an ADB keyboard, so make sure that we set the keyboard
alias rather than the adb-keyboard alias.

This also enables us to simplify the alias logic in the PPC arch_of_init()
function.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 arch/ppc/qemu/init.c | 9 ++-------
 drivers/usbhid.c     | 2 +-
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c
index eba93c9..af15682 100644
--- a/arch/ppc/qemu/init.c
+++ b/arch/ppc/qemu/init.c
@@ -1043,13 +1043,8 @@ arch_of_init(void)
         push_str("screen");
         fword("property");
     } else {
-        if (is_apple()) {
-            stdin_path = "adb-keyboard";
-            stdout_path = "screen";
-        } else {
-            stdin_path = "keyboard";
-            stdout_path = "screen";
-        }
+        stdin_path = "keyboard";
+        stdout_path = "screen";
     }
 
     kvm_of_init();
diff --git a/drivers/usbhid.c b/drivers/usbhid.c
index dcd4ce6..1c13113 100644
--- a/drivers/usbhid.c
+++ b/drivers/usbhid.c
@@ -575,5 +575,5 @@ void ob_usb_hid_add_keyboard(const char *path)
 	fword("device-type");
 
 	aliases = find_dev("/aliases");
-	set_property(aliases, "adb-keyboard", name, strlen(name) + 1);
+	set_property(aliases, "keyboard", name, strlen(name) + 1);
 }
-- 
2.11.0




More information about the OpenBIOS mailing list