• Lukas Wunner's avatar
    PCI: pciehp: Publish to user space last on probe · 774d446b
    Lukas Wunner authored
    The PCI hotplug core has just been refactored to separate slot
    initialization for in-kernel use from publication to user space.
    
    Take advantage of it in pciehp by publishing to user space last on
    probe.  This will allow enable/disablement of the slot exclusively from
    the IRQ thread because the IRQ is requested after initialization for
    in-kernel use (thereby getting its unique name needed by the IRQ thread)
    but before user space is able to submit enable/disable requests.
    
    On teardown, the order is the same in reverse:  The user space interface
    is removed prior to freeing the IRQ and destroying the slot.
    Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    774d446b
pciehp_core.c 8.08 KB