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

@@ -410,3 +410,12 @@ ps2mouse_init(struct atkbdc_base *base)
return mouse;
}
void
ps2mouse_deinit(struct atkbdc_base *base)
{
console_ptr_unregister();
fifo_reset(base->ps2mouse);
free(base->ps2mouse);
base->ps2mouse = NULL;
}