Re: Badness in pci_find_subsys

From: Greg KH
Date: Mon Feb 23 2004 - 16:26:21 EST


On Mon, Feb 23, 2004 at 08:51:45AM -0800, Tobias Oed wrote:
> [*]
> Do I need to hold the pci_bus_lock spinlock for the following (checks for
> NULL omitted here)
> dev = pci_find_slot(bus, PCI_DEVFN(slot, function));
> dev = pci_dev_get(dev);
> I'd rater use pci_get_slot instead of pci_find_slot, but I don't know how to
> get a struct pci_bus * from an int.

You should never need to use those functions at all anyway. Just use
the proper pci_register_driver() call and be done with it.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/