summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-09-30 23:27:26 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 00:39:20 -0700
commit14fef6414be49d59f4784eeef8d9c3f468993205 (patch)
tree5b30d0df89584a2a7abea19c558b62db57570479
parentf2443ab6c485701576e9116ee44817e66adafd5a (diff)
downloadop-kernel-dev-14fef6414be49d59f4784eeef8d9c3f468993205.zip
op-kernel-dev-14fef6414be49d59f4784eeef8d9c3f468993205.tar.gz
[PATCH] via82cxxx_audio: Use pci_get_device
pci_find_device is not refcounting and should be getting killed off. Signed-off-by: Alan Cox <alan@redhat.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--sound/oss/via82cxxx_audio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/oss/via82cxxx_audio.c b/sound/oss/via82cxxx_audio.c
index 08d8c94..2fec42f 100644
--- a/sound/oss/via82cxxx_audio.c
+++ b/sound/oss/via82cxxx_audio.c
@@ -1547,7 +1547,7 @@ static int via_mixer_open (struct inode *inode, struct file *file)
DPRINTK ("ENTER\n");
- while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
+ while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
drvr = pci_dev_driver (pdev);
if (drvr == &via_driver) {
assert (pci_get_drvdata (pdev) != NULL);
@@ -1562,6 +1562,7 @@ static int via_mixer_open (struct inode *inode, struct file *file)
return -ENODEV;
match:
+ pci_dev_put(pdev);
file->private_data = card->ac97;
DPRINTK ("EXIT, returning 0\n");
@@ -3245,7 +3246,7 @@ static int via_dsp_open (struct inode *inode, struct file *file)
}
card = NULL;
- while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
+ while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
drvr = pci_dev_driver (pdev);
if (drvr == &via_driver) {
assert (pci_get_drvdata (pdev) != NULL);
@@ -3264,6 +3265,7 @@ static int via_dsp_open (struct inode *inode, struct file *file)
return -ENODEV;
match:
+ pci_dev_put(pdev);
if (nonblock) {
if (!mutex_trylock(&card->open_mutex)) {
DPRINTK ("EXIT, returning -EAGAIN\n");
OpenPOWER on IntegriCloud