* [PATCH 2/6] janitor: net/gt96100eth: pci_find_device to pci_get_device
@ 2004-10-03 6:19 Scott Feldman
2004-10-03 8:29 ` [Kernel-janitors] " Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Scott Feldman @ 2004-10-03 6:19 UTC (permalink / raw)
To: kernel-janitors, stevel, source, linux-mips
Replace pci_find_device with pci_get_device/pci_dev_put to plug
race with pci_find_device.
Signed-off-by: Scott Feldman <sfeldma@pobox.com>
--- linux-2.6.9-rc3/drivers/net/gt96100eth.c 2004-10-02 21:17:24.000000000 -0700
+++ linux-2.6.9-rc3-dsf/drivers/net/gt96100eth.c 2004-10-02 21:23:57.000000000 -0700
@@ -617,9 +617,9 @@ static int gt96100_init_module(void)
/*
* Stupid probe because this really isn't a PCI device
*/
- if (!(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
+ if (!(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
PCI_DEVICE_ID_MARVELL_GT96100, NULL)) &&
- !(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
+ !(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
PCI_DEVICE_ID_MARVELL_GT96100A, NULL))) {
printk(KERN_ERR __FILE__ ": GT96100 not found!\n");
return -ENODEV;
@@ -629,12 +629,14 @@ static int gt96100_init_module(void)
if (cpuConfig & (1<<12)) {
printk(KERN_ERR __FILE__
": must be in Big Endian mode!\n");
+ pci_dev_put(pci);
return -ENODEV;
}
for (i=0; i < NUM_INTERFACES; i++)
retval |= gt96100_probe1(pci, i);
+ pci_dev_put(pci);
return retval;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Kernel-janitors] [PATCH 2/6] janitor: net/gt96100eth: pci_find_device to pci_get_device
2004-10-03 6:19 [PATCH 2/6] janitor: net/gt96100eth: pci_find_device to pci_get_device Scott Feldman
@ 2004-10-03 8:29 ` Christoph Hellwig
2004-10-03 17:33 ` Scott Feldman
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2004-10-03 8:29 UTC (permalink / raw)
To: Scott Feldman; +Cc: kernel-janitors, stevel, source, linux-mips
On Sat, Oct 02, 2004 at 11:19:31PM -0700, Scott Feldman wrote:
> Replace pci_find_device with pci_get_device/pci_dev_put to plug
> race with pci_find_device.
Shouldn't this use pci_dev_present?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Kernel-janitors] [PATCH 2/6] janitor: net/gt96100eth: pci_find_device to pci_get_device
2004-10-03 8:29 ` [Kernel-janitors] " Christoph Hellwig
@ 2004-10-03 17:33 ` Scott Feldman
0 siblings, 0 replies; 3+ messages in thread
From: Scott Feldman @ 2004-10-03 17:33 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: kernel-janitors, stevel, source, linux-mips
On Sun, 2004-10-03 at 01:29, Christoph Hellwig wrote:
> On Sat, Oct 02, 2004 at 11:19:31PM -0700, Scott Feldman wrote:
> > Replace pci_find_device with pci_get_device/pci_dev_put to plug
> > race with pci_find_device.
>
> Shouldn't this use pci_dev_present?
No, because the dev pointer is needed later in the code if dev was
found. pci_dev_present doesn't return the dev.
-scott
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-03 17:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-03 6:19 [PATCH 2/6] janitor: net/gt96100eth: pci_find_device to pci_get_device Scott Feldman
2004-10-03 8:29 ` [Kernel-janitors] " Christoph Hellwig
2004-10-03 17:33 ` Scott Feldman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox