From: Jiri Slaby <jirislaby@gmail.com>
To: Greg KH <gregkh@suse.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-pci@atrey.karlin.mff.cuni.cz, alsa-devel@alsa-project.org,
perex@suse.cz
Subject: [PATCH 4/6] include, sound: pci_find_device remove (s/pci/au88x0/au88x0.c)
Date: Fri, 2 Sep 2005 23:44:55 +0200 [thread overview]
Message-ID: <200509022144.j82Lit5m031351@wscnet.wsc.cz> (raw)
In-Reply-To: <200509022122.j82LMMwV030426@wscnet.wsc.cz>
Generated in 2.6.13-mm1 kernel version.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
au88x0.c | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
--- a/sound/pci/au88x0/au88x0.c
+++ b/sound/pci/au88x0/au88x0.c
@@ -79,19 +79,21 @@ static void vortex_fix_agp_bridge(struct
static void __devinit snd_vortex_workaround(struct pci_dev *vortex, int fix)
{
- struct pci_dev *via;
+ struct pci_dev *via = NULL;
/* autodetect if workarounds are required */
if (fix == 255) {
/* VIA KT133 */
- via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8365_1, NULL);
+ via = pci_get_device(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_8365_1, NULL);
/* VIA Apollo */
if (via == NULL) {
- via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C598_1, NULL);
- }
- /* AMD Irongate */
- if (via == NULL) {
- via = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL);
+ via = pci_get_device(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_82C598_1, NULL);
+ /* AMD Irongate */
+ if (via == NULL)
+ via = pci_get_device(PCI_VENDOR_ID_AMD,
+ PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL);
}
if (via) {
printk(KERN_INFO CARD_NAME ": Activating latency workaround...\n");
@@ -101,13 +103,17 @@ static void __devinit snd_vortex_workaro
} else {
if (fix & 0x1)
vortex_fix_latency(vortex);
- if ((fix & 0x2) && (via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8365_1, NULL)))
+ if ((fix & 0x2) && (via = pci_get_device(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_8365_1, NULL)))
vortex_fix_agp_bridge(via);
- if ((fix & 0x4) && (via = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C598_1, NULL)))
+ if ((fix & 0x4) && (via = pci_get_device(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_82C598_1, NULL)))
vortex_fix_agp_bridge(via);
- if ((fix & 0x8) && (via = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL)))
+ if ((fix & 0x8) && (via = pci_get_device(PCI_VENDOR_ID_AMD,
+ PCI_DEVICE_ID_AMD_FE_GATE_7007, NULL)))
vortex_fix_agp_bridge(via);
}
+ pci_dev_put(via);
}
// component-destructor
next prev parent reply other threads:[~2005-09-02 21:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-02 21:22 [PATCH 0/6] include, sound: pci_find_device remove Jiri Slaby
2005-09-02 21:44 ` [PATCH 6/6] include, sound: pci_find_device remove (s/pci/via82xx.c) Jiri Slaby
2005-09-07 13:29 ` [Alsa-devel] " Takashi Iwai
2005-09-02 21:44 ` [PATCH 3/6] include, sound: pci_find_device remove (s/pci/ali5451/ali5451.c) Jiri Slaby
2005-09-02 21:44 ` [PATCH 5/6] include, sound: pci_find_device remove (s/pci/cs46xx/cs46xx_lib.c) Jiri Slaby
2005-09-02 21:44 ` Jiri Slaby [this message]
2005-09-02 21:44 ` [PATCH 2/6] include, sound: pci_find_device remove (s/core/memalloc.c) Jiri Slaby
2005-09-02 21:45 ` [PATCH 1/6] include, sound: pci_find_device remove (include/asm-i386/ide.h) Jiri Slaby
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=200509022144.j82Lit5m031351@wscnet.wsc.cz \
--to=jirislaby@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=perex@suse.cz \
/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®