[RFC, PATCH] Getting rid of direct calls to keyboard's methods via kbdsw[] array

From: Wojciech A. Koszek <wkoszek_at_freebsd.org>
Date: Sat, 22 Dec 2007 04:01:56 +0000
Hello,

In the FreeBSD kernel we have notion of keyboard represented by
"keyboard_t" type. We operate on such structures throught another
keyboard_switch structure. It lets us to use keyboard API without
distinguishing exactly which hardware we're working with.

My proposal is to unify a way in which we call such specialized
methods, so that instead of direct array indexing used to call specific
keyboard method:

	(*kbdsw[(kbd)->kb_index]->enable)((kbd))

We would use unified interface:

	kbdd_enable(kbd)

Proposed patch is here:

	http://people.freebsd.org/~wkoszek/patches/tty/kbdcleanup.patch

Suggestions are welcome.

Thanks,

-- 
Wojciech A. Koszek
wkoszek_at_FreeBSD.org
http://FreeBSD.czest.pl/dunstan/
Received on Sat Dec 22 2007 - 02:12:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:24 UTC