lkml.org 
[lkml]   [2001]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: PATCH for 2.4.0: assign ad1848 mixer operations to correct module
Date
> > +
> > + if (owner)
> > + ad1848_mixer_operations.owner = owner;
> > +
> > if ((e = sound_install_mixer(MIXER_DRIVER_VERSION,
> > dev_name,
> > &ad1848_mixer_operations,
> >
> > BTW Isn't it ever-so-slightly dodgy modifying the static
>
> Very.
>
> > operations in exactly the same way as the ad1848_audio_driver
> > structure, but doesn't this mean that the ad1848_init() function now
> > "remembers" the owner from the previous call?
>
> Yeah
>
> > Or maybe the sound_install_XXXX() functions should accept "owner"
> > parameters, so that the static structs could become "const"?
>
> I think you either need owner as a parameter or to make a copy of the
> ad1848_mixer_operations in your sscape driver and pass that ?

I thought about both of these, but the impact of adding an owner
parameter to sound_install_mixer() was too great, and the
ad1848_mixer_operations structure was declared static rather than
extern in ad1848.c. (Probably rightly so, too). Fortunately, I found
alternative inspiration in mpu401.c.

It might be "interesting" to redeclare all the static struct
mixer_operations as "const", along with the argument in
sound_install_mixer(), and see exactly how many sound modules scream
in pain. Maybe too interesting for 2.4.1... :-) ?

Chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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