lkml.org 
[lkml]   [1998]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.1.83: Sound, SB16, Modules, MIDI?
On Tue, 3 Feb 1998, Alan Cox wrote:

> > making a wired driver as opposed to a module could also be specified in
> > the module case, and be made available to the driver, i.e.:
>
> Possibly. It needs to allow you to default it to the unset value however.
> Isee no big problem with it.
>

Right. I think you mean use some odd value such as 0xdeadbeef to
indicate to the module that no value was set for the param, and that it
should use its own defaults, which in the case I cited were -1. In all
cases, allowing args to the module to override.

A slightly different plan, which would require closer coupling between
the driver code and the config mechanism, would be for each driver param
to have both a wired-default and a module-default value.

I haven't studied that code, so this may be off, but a third idea would
be to have code in init_module to the effect of

#ifdef DRIVER_PARAM_X
x = DRIVER_PARAM_X
#else
x = <some default>
#endif

which is a bit cumbersome and ugly. Perhaps something could be done with
the
MODULE()
macro.

--Jim <a href="http://as220.org/jb"> My Page</a>


\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.041 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site