Subject: Re: Adding video mode info to struct wsscreen_descr
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Noriyuki Soda <soda@sra.co.jp>
List: tech-kern
Date: 07/09/2002 23:44:07
>>>>> On Tue, 9 Jul 2002 07:38:26 -0700,
	Jason R Thorpe <thorpej@wasabisystems.com> said:

> How about just a "void *modecookie" or something that points to an
> object that is opaque to wscons itself?  Why does wscons need to know
> about the dot clock, etc?  Only the VGA support routines need to know
> about that.

Even if modecookie is used as opaque type from wscons related
routines, "struct video_modetiming" is better than "void *",
because compiler can check its type with the former.

Only "struct video_modetiming;" (rather than "#include <dev/ic/vidmode.h>")
is needed in wscons related source files for the opaque case.

P.S.
I think it is better to use this opaque technique for other opaque
types (e.g. cookie for interrupt handler), too.
--
osda