diff options
author | wkoszek <wkoszek@FreeBSD.org> | 2007-12-29 21:55:25 +0000 |
---|---|---|
committer | wkoszek <wkoszek@FreeBSD.org> | 2007-12-29 21:55:25 +0000 |
commit | 8a0ce839351386ec837779aa9f63b575cf8d096a (patch) | |
tree | 1c319020fe289b1aa63eb5ce1ee13396a294df02 /sys/dev/atkbdc | |
parent | 94cf0432f599e4d9a832f18a63279ff4e4166932 (diff) | |
download | FreeBSD-src-8a0ce839351386ec837779aa9f63b575cf8d096a.zip FreeBSD-src-8a0ce839351386ec837779aa9f63b575cf8d096a.tar.gz |
Remove explicit calls to keyboard methods with their respective variants
implemented with macros. This patch improves code readability. Reasoning
behind kbdd_* is a "keyboard discipline".
List of macros is supposed to be complete--all methods of keyboard_switch
should have their respective macros from now on.
Functionally, this code should be no-op. My intention is to leave current
behaviour of code as is.
Glanced at by: rwatson
Reviewed by: emax, marcel
Approved by: cognet
Diffstat (limited to 'sys/dev/atkbdc')
-rw-r--r-- | sys/dev/atkbdc/atkbd.c | 8 | ||||
-rw-r--r-- | sys/dev/atkbdc/atkbd_atkbdc.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c index 778515e..0149cb8 100644 --- a/sys/dev/atkbdc/atkbd.c +++ b/sys/dev/atkbdc/atkbd.c @@ -162,15 +162,15 @@ atkbd_timeout(void *arg) */ s = spltty(); kbd = (keyboard_t *)arg; - if ((*kbdsw[kbd->kb_index]->lock)(kbd, TRUE)) { + if (kbdd_lock(kbd, TRUE)) { /* * We have seen the lock flag is not set. Let's reset * the flag early, otherwise the LED update routine fails * which may want the lock during the interrupt routine. */ - (*kbdsw[kbd->kb_index]->lock)(kbd, FALSE); - if ((*kbdsw[kbd->kb_index]->check_char)(kbd)) - (*kbdsw[kbd->kb_index]->intr)(kbd, NULL); + kbdd_lock(kbd, FALSE); + if (kbdd_check_char(kbd)) + kbdd_intr(kbd, NULL); } splx(s); timeout(atkbd_timeout, arg, hz/10); diff --git a/sys/dev/atkbdc/atkbd_atkbdc.c b/sys/dev/atkbdc/atkbd_atkbdc.c index ec6555b..9531fa2 100644 --- a/sys/dev/atkbdc/atkbd_atkbdc.c +++ b/sys/dev/atkbdc/atkbd_atkbdc.c @@ -158,9 +158,9 @@ atkbdresume(device_t dev) kbd->kb_flags &= ~KB_INITIALIZED; args[0] = device_get_unit(device_get_parent(dev)); args[1] = rman_get_start(sc->intr); - (*kbdsw[kbd->kb_index]->init)(device_get_unit(dev), &kbd, - args, device_get_flags(dev)); - (*kbdsw[kbd->kb_index]->clear_state)(kbd); + kbdd_init(kbd, device_get_unit(dev), &kbd, args, + device_get_flags(dev)); + kbdd_clear_state(kbd); } return 0; } @@ -171,7 +171,7 @@ atkbdintr(void *arg) keyboard_t *kbd; kbd = (keyboard_t *)arg; - (*kbdsw[kbd->kb_index]->intr)(kbd, NULL); + kbdd_intr(kbd, NULL); } DRIVER_MODULE(atkbd, atkbdc, atkbd_driver, atkbd_devclass, 0, 0); |