summaryrefslogtreecommitdiffstats
path: root/sys/dev/vkbd
diff options
context:
space:
mode:
authorwkoszek <wkoszek@FreeBSD.org>2007-12-29 21:55:25 +0000
committerwkoszek <wkoszek@FreeBSD.org>2007-12-29 21:55:25 +0000
commit8a0ce839351386ec837779aa9f63b575cf8d096a (patch)
tree1c319020fe289b1aa63eb5ce1ee13396a294df02 /sys/dev/vkbd
parent94cf0432f599e4d9a832f18a63279ff4e4166932 (diff)
downloadFreeBSD-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/vkbd')
-rw-r--r--sys/dev/vkbd/vkbd.c9
1 files changed, 4 insertions, 5 deletions
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);
OpenPOWER on IntegriCloud