]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
PCI: connect struct pci_dev to struct pci_slot
authorAlex Chiang <achiang@hp.com>
Tue, 2 Sep 2008 15:40:51 +0000 (09:40 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 20 Oct 2008 17:53:52 +0000 (10:53 -0700)
commitcef354db0d7a7207ea78c716753d9216a9c2b7e1
treebd8c0c6356f852b10117a166b67d2b017445ce2b
parent93ff68a55aa92180a765d6c51c3303f6200167a6
PCI: connect struct pci_dev to struct pci_slot

The introduction of struct pci_slot (f46753c5e354b857b20ab8e0fe7b25)
added a struct pci_slot pointer to struct pci_dev, but we forgot to
associate the two.

Connect the two structs together; the interesting portions of the object
lifetimes are:

- when a new pci_slot is created, connect it to the appropriate
  pci_dev's. A single pci_slot may be associated with multiple
  pci_dev's, e.g. any multi-function PCI device.

- when a pci_slot is released, look for all the pci_dev's it was
  associated with, and set their pci_slot pointers to NULL

- when a pci_dev is created, look for slots to associate with.

Note -- when a pci_dev is released, we don't need to do any bookkeeping,
since pci_slot's do not have pointers to pci_dev's.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/probe.c
drivers/pci/slot.c