From 8a0ce839351386ec837779aa9f63b575cf8d096a Mon Sep 17 00:00:00 2001 From: wkoszek Date: Sat, 29 Dec 2007 21:55:25 +0000 Subject: 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 --- sys/dev/vkbd/vkbd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sys/dev/vkbd') diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c index 9eca6de..9807036 100644 --- a/sys/dev/vkbd/vkbd.c +++ b/sys/dev/vkbd/vkbd.c @@ -278,11 +278,11 @@ vkbd_dev_close(struct cdev *dev, int foo, int bar, struct thread *td) VKBD_UNLOCK(state); - (*kbdsw[kbd->kb_index]->disable)(kbd); + kbdd_disable(kbd); #ifdef KBD_INSTALL_CDEV kbd_detach(kbd); #endif /* def KBD_INSTALL_CDEV */ - (*kbdsw[kbd->kb_index]->term)(kbd); + kbdd_term(kbd); /* XXX FIXME: dev->si_drv1 locking */ dev->si_drv1 = NULL; @@ -437,8 +437,7 @@ vkbd_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thre { keyboard_t *kbd = VKBD_KEYBOARD(dev); - return ((kbd == NULL)? ENXIO : - (*kbdsw[kbd->kb_index]->ioctl)(kbd, cmd, data)); + return ((kbd == NULL)? ENXIO : kbdd_ioctl(kbd, cmd, data)); } /* Poll device */ @@ -482,7 +481,7 @@ vkbd_dev_intr(void *xkbd, int pending) keyboard_t *kbd = (keyboard_t *) xkbd; vkbd_state_t *state = (vkbd_state_t *) kbd->kb_data; - (*kbdsw[kbd->kb_index]->intr)(kbd, NULL); + kbdd_intr(kbd, NULL); VKBD_LOCK(state); -- cgit v1.1