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

From: Wojciech A. Koszek <wkoszek_at_freebsd.org>
Date: Sat, 22 Dec 2007 17:41:08 +0000
Hello,

This is very similar patch to my kbdsw[] conversion patch, but directed
to the video output path. In the kernel, video adapter is represented by
"video_adapter" structure. Video adapter code declares itself as being the
video adapter driver with VIDEO_DRIVER() macro. It makes it appear in
vidsw[] array. For now, we indexed this array directly. I want this
behaviour to be improved.


My proposal is here:

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

With this patch, instead of calling:

	(*vidsw[adp->va_index]-><mathod>)(args...)

You call:

	vidd_<method>(agp, args..);

Just like in kbdsw[] patch, I defined missing macros with their
respective convention. My intention was to provide full set of macros
for all "struct video_switch" function pointers.

Comments and suggestions are welcome,

Thanks,

-- 
Wojciech A. Koszek
wkoszek_at_FreeBSD.org
http://FreeBSD.czest.pl/dunstan/
Received on Sat Dec 22 2007 - 15:51:48 UTC

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