On Fri, 07 Jul 2006 16:52:38 PDT, "Randy.Dunlap" said: > @@ -405,11 +410,15 @@ void pcie_port_device_remove(struct pci_ > void pcie_port_bus_register(void) > { > bus_register(&pcie_port_bus_type); > + pcie_dev_registered = 1; Shouldn't this be 'pcie_dev_registered++;' > } > > void pcie_port_bus_unregister(void) > { > - bus_unregister(&pcie_port_bus_type); > + if (pcie_dev_registered) { > + bus_unregister(&pcie_port_bus_type); > + pcie_dev_registered = 0; and 'pciedev_registered--;' > + } > } to keep it from blowing up if 2 bus get registered, then one de-registered, and then re-registered again? I could see this happening in a hotplug design?
Attachment:
pgp5ZKpGc7T1A.pgp
Description: PGP signature
- References:
- [PATCH] PCIE: create sysfs directory on first use
- From: "Randy.Dunlap" <[email protected]>
- [PATCH] PCIE: create sysfs directory on first use
- Prev by Date: [RFC 4/8] page allocator: Optional ZONE_DMA
- Next by Date: [RFC 3/8] eventcounters: Optional ZONE_DMA
- Previous by thread: [PATCH] PCIE: check and return bus_register errors
- Next by thread: pdflush taking CPU time during heavy NFS I/O
- Index(es):