DM: add deinit function for ps2kbd and ps2mouse

Add deinit function for ps2kbd and ps2mouse.

To support deinit function for ps2kbd and ps2mouse which
has struct atkbdc_base as parameter, we make struct
atkbdc_base exported as public.

We also add console unregister function for keyboard
and mouse. Which are called in ps2mouse/ps2kbd deinit
function.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
Yin Fengwei
2018-03-30 13:30:43 +08:00
committed by Jack Ren
parent f0b74016d1
commit f6db755c7f
8 changed files with 121 additions and 83 deletions

View File

@@ -475,3 +475,11 @@ ps2kbd_init(struct atkbdc_base *base)
return kbd;
}
void
ps2kbd_deinit(struct atkbdc_base *base)
{
console_kbd_unregister();
free(base->ps2kbd);
base->ps2kbd = NULL;
}