From: Rene Herman <rene.herman@keyaccess.nl>
To: Takashi Iwai <tiwai@suse.de>
Cc: ALSA devel <alsa-devel@alsa-project.org>
Subject: [PATCH] ALSA: ac97: copy subsys values from the PCI device
Date: Thu, 17 Jul 2008 14:24:32 +0200 [thread overview]
Message-ID: <487F3A00.6000705@keyaccess.nl> (raw)
[-- Attachment #1: Type: text/plain, Size: 270 bytes --]
Hi.
Just getting to know to the code...
Why do we reread the subsys values from PCI config space in the AC97 code?
(this in addition to why we store the values in the ac97 struct in the
first place if they're available through ac97->pci but that's secondary)
Rene.
[-- Attachment #2: 0001-ALSA-ac97-copy-subsys-values-from-the-PCI-device.patch --]
[-- Type: text/plain, Size: 1078 bytes --]
>From 01de5a42c7d5a0237895a476735028298203f30f Mon Sep 17 00:00:00 2001
From: Rene Herman <rene.herman@gmail.com>
Date: Thu, 17 Jul 2008 14:18:10 +0200
Subject: [PATCH] ALSA: ac97: copy subsys values from the PCI device
copy the subsys values from the PCI device instead of rereading them.
Signed-off-by: Rene Herman <rene.herman@gmail.com>
---
sound/pci/ac97/ac97_codec.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 45fd290..4f4343d 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -2015,8 +2015,8 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template,
#ifdef CONFIG_PCI
if (ac97->pci) {
- pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_VENDOR_ID, &ac97->subsystem_vendor);
- pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_ID, &ac97->subsystem_device);
+ ac97->subsystem_vendor = ac97->pci->subsystem_vendor;
+ ac97->subsystem_device = ac97->pci->subsystem_device;
}
#endif
if (bus->ops->reset) {
--
1.5.5
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next reply other threads:[~2008-07-17 12:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 12:24 Rene Herman [this message]
2008-07-17 12:26 ` [PATCH] ALSA: ac97: copy subsys values from the PCI device Takashi Iwai
2008-07-17 12:31 ` Rene Herman
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=487F3A00.6000705@keyaccess.nl \
--to=rene.herman@keyaccess.nl \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.