From: "Daniel Marjamäki" <daniel.marjamaki@comhem.se>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] changed from pci_find_device to pci_get_device
Date: Tue, 29 Nov 2005 13:56:09 +0000 [thread overview]
Message-ID: <438C5DF9.80800@comhem.se> (raw)
In-Reply-To: <438A0BE0.4010904@comhem.se>
[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]
Hello friends!
I have reworked my patch that I sent a few days ago.
I made huge mistakes in the previous patch but I hope this patch is perfect.
--- a/drivers/ide/pci/via82cxxx.c 2005-11-29 14:45:00.000000000 +0100
+++ b/drivers/ide/pci/via82cxxx.c 2005-11-29 14:49:32.000000000 +0100
@@ -247,7 +247,7 @@ static struct via_isa_bridge *via_config
u8 t;
for (via_config = via_isa_bridges; via_config->id; via_config++)
- if ((*isa = pci_find_device(PCI_VENDOR_ID_VIA +
+ if ((*isa = pci_get_device(PCI_VENDOR_ID_VIA +
!!(via_config->flags & VIA_BAD_ID),
via_config->id, NULL))) {
@@ -255,6 +255,9 @@ static struct via_isa_bridge *via_config
if (t >= via_config->rev_min &&
t <= via_config->rev_max)
break;
+
+ pci_dev_put(*isa);
+ *isa = NULL;
}
return via_config;
@@ -360,6 +363,8 @@ static unsigned int __devinit init_chips
via_dma[via_config->flags & VIA_UDMA],
pci_name(dev));
+ pci_dev_put(isa);
+
return 0;
}
@@ -430,6 +435,8 @@ static void __devinit init_hwif_via82cxx
ide_set_hwifdata(hwif, vdev);
vdev->via_config = via_config_find(&isa);
+ if (isa)
+ pci_dev_put(isa);
via_cable_detect(hwif->pci_dev, vdev);
hwif->autodma = 0;
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2005-11-29 13:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-27 19:41 [KJ] changed from pci_find_device to pci_get_device Daniel Marjamäki
2005-11-28 20:53 ` Greg KH
2005-11-28 21:43 ` Daniel Marjamäki
2005-11-29 11:44 ` Alexey Dobriyan
2005-11-29 11:51 ` Daniel Marjamäki
2005-11-29 12:58 ` Alexey Dobriyan
2005-11-29 13:20 ` Daniel Marjamäki
2005-11-29 13:56 ` Daniel Marjamäki [this message]
2005-11-29 17:34 ` Greg KH
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=438C5DF9.80800@comhem.se \
--to=daniel.marjamaki@comhem.se \
--cc=kernel-janitors@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 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.