Re: RFC: Changes for PCI

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Thu Jun 28 2001 - 18:27:10 EST


"Khachaturov, Vassilii" wrote:
>
> On Wed, 27 Jun 2001, Jeff Garzik wrote:
>
> > However, I think the driver (only going by your
> description) would be
> > more correct to use a pointer to struct pci_dev. We have a
> token in the
> > kernel that is guaranteed 100% unique to any given PCI device: the
> > pointer to its struct pci_dev.
>
> Is it? With a hotplug device removed and another one added,
> isn't there a slight chance that the pci_dev pointer to the new device
> will get allocated in place of the old one?

If you want to get pedantic, yes ;-) The pci_dev pointer is unique for
the lifetime of the PCI device, which works just as well in the example
used in the thread.

-- 
Jeff Garzik      | Andre the Giant has a posse.
Building 1024    |
MandrakeSoft     |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 30 2001 - 21:00:21 EST