feat: gfxm: a layer provides user space access to low level interfacing of graphic...
[lunaix-os.git] / lunaix-os / hal / char / ps2kbd.c
index d2be85dbe8b0dae0d4ec75c74dd5130efbb2d68c..c86350bc190576158d3b615b63f948838e8dda25 100644 (file)
@@ -224,7 +224,7 @@ ps2_kbd_init(struct device_def* devdef)
     kbd_state.translation_table = scancode_set2;
     kbd_state.state = KBD_STATE_KWAIT;
 
-    kbd_idev = input_add_device("i8042-kbd");
+    kbd_idev = input_add_device(&devdef->class, devdef->name);
 
     /* FIXME This require systematical rework! */
     // acpi_context* acpi_ctx = acpi_get_context();
@@ -576,7 +576,7 @@ ps2_issue_dev_cmd(char cmd, u16_t arg)
 
 static struct device_def devrtc_i8042kbd = {
     .name = "i8042 Keyboard",
-    .class = DEVCLASS(DEVIF_SOC, DEVFN_INPUT, DEV_X86LEGACY, 0),
+    .class = DEVCLASS(DEVIF_SOC, DEVFN_INPUT, DEV_KBD),
     .init = ps2_kbd_init
 };
 EXPORT_DEVICE(i8042_kbd, &devrtc_i8042kbd, load_timerstage);