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/usb | |
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/usb')
-rw-r--r-- | sys/dev/usb/ukbd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index 6d2943d..01efc7f 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -222,14 +222,14 @@ ukbd_detach(device_t self) DPRINTF(("%s: keyboard not attached!?\n", device_get_nameunit(self))); return ENXIO; } - (*kbdsw[kbd->kb_index]->disable)(kbd); + kbdd_disable(kbd); #ifdef KBD_INSTALL_CDEV error = kbd_detach(kbd); if (error) return error; #endif - error = (*kbdsw[kbd->kb_index]->term)(kbd); + error = kbdd_term(kbd); if (error) return error; @@ -246,7 +246,7 @@ ukbd_resume(device_t self) kbd = kbd_get_keyboard(kbd_find_keyboard(DRIVER_NAME, device_get_unit(self))); if (kbd) - (*kbdsw[kbd->kb_index]->clear_state)(kbd); + kbdd_clear_state(kbd); return (0); } @@ -255,7 +255,7 @@ ukbd_intr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status) { keyboard_t *kbd = (keyboard_t *)addr; - (*kbdsw[kbd->kb_index]->intr)(kbd, (void *)status); + kbdd_intr(kbd, (void *)status); } #define UKBD_DEFAULT 0 @@ -705,7 +705,7 @@ ukbd_timeout(void *arg) kbd = (keyboard_t *)arg; state = (ukbd_state_t *)kbd->kb_data; s = splusb(); - (*kbdsw[kbd->kb_index]->intr)(kbd, (void *)USBD_NORMAL_COMPLETION); + kbdd_intr(kbd, (void *)USBD_NORMAL_COMPLETION); callout_reset(&state->ks_timeout_handle, hz / 40, ukbd_timeout, arg); splx(s); } |