From: Chris Rankin <rankinc@zip.com.au>
To: alan@lxorguk.ukuu.org.uk (Alan Cox)
Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org
Subject: Re: PATCH for 2.4.0: assign ad1848 mixer operations to correct module
Date: Mon, 8 Jan 2001 17:33:49 +0000 (GMT) [thread overview]
Message-ID: <200101081733.f08HXoe02651@wittsend.ukgateway.net> (raw)
In-Reply-To: <E14FdQR-0004fZ-00@the-village.bc.nu> from "Alan Cox" at Jan 08, 2001 02:37:29 PM
> > +
> > + 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/
prev parent reply other threads:[~2001-01-08 17:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-08 13:08 Chris Rankin
2001-01-08 14:37 ` Alan Cox
2001-01-08 17:33 ` Chris Rankin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200101081733.f08HXoe02651@wittsend.ukgateway.net \
--to=rankinc@zip.com.au \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®