HomeFreeBSD

kbdmux: simplify modevent handler

Description

kbdmux: simplify modevent handler

In the event of a MOD_LOAD failure, MOD_UNLOAD will be invoked to unwind
module load. Most of the reversion in MOD_LOAD can just be deferred to
normal MOD_UNLOAD cleanup, rather than duplicating the effort.

A NULL return of kbd_get_switch in the MOD_UNLOAD handler has been
downgraded from a panic to a successful return, as that certainly just means
that kbd_add_driver failed (not possible at the moment) and we have no work
to do.

Details

Provenance
kevansAuthored on Dec 26 2019, 5:25 PM
Parents
rG2899979df9b0: Revert r355806: kbd drivers: don't double register keyboard drivers
Branches
Unknown
Tags
Unknown

Event Timeline