| 94551ceb | 26-Dec-2019 |
Kyle Evans <[email protected]> |
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 cl
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.
show more ...
|
| 5a7a578b | 16-Dec-2019 |
Kyle Evans <[email protected]> |
kbd drivers: don't double register keyboard drivers
Keyboard drivers are generally registered via linker set. In these cases, they're also available as kmods which use KPI for registering/unregister
kbd drivers: don't double register keyboard drivers
Keyboard drivers are generally registered via linker set. In these cases, they're also available as kmods which use KPI for registering/unregistering keyboard drivers outside of the linker set.
For built-in modules, we still fire off MOD_LOAD and maybe even MOD_UNLOAD if an error occurs, leading to registration via linker set and at MOD_LOAD time.
This is a minor optimization at best, but it keeps the internal kbd driver tidy as a future change will merge the linker set driver list into its internal keyboard_drivers list via SYSINIT and simplify driver lookup by removing the need to consult the linker set.
show more ...
|