mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
powerpc/pci: Add release_device() hook to phb ops
Add release_device() hook to phb ops so we can clean up for specific phbs. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
5b64d2cc41
commit
10e796309a
@ -27,6 +27,8 @@ struct pci_controller_ops {
|
|||||||
* allow assignment/enabling of the device. */
|
* allow assignment/enabling of the device. */
|
||||||
bool (*enable_device_hook)(struct pci_dev *);
|
bool (*enable_device_hook)(struct pci_dev *);
|
||||||
|
|
||||||
|
void (*release_device)(struct pci_dev *);
|
||||||
|
|
||||||
/* Called during PCI resource reassignment */
|
/* Called during PCI resource reassignment */
|
||||||
resource_size_t (*window_alignment)(struct pci_bus *, unsigned long type);
|
resource_size_t (*window_alignment)(struct pci_bus *, unsigned long type);
|
||||||
void (*reset_secondary_bus)(struct pci_dev *dev);
|
void (*reset_secondary_bus)(struct pci_dev *dev);
|
||||||
|
@ -29,7 +29,12 @@
|
|||||||
*/
|
*/
|
||||||
void pcibios_release_device(struct pci_dev *dev)
|
void pcibios_release_device(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
|
struct pci_controller *phb = pci_bus_to_host(dev->bus);
|
||||||
|
|
||||||
eeh_remove_device(dev);
|
eeh_remove_device(dev);
|
||||||
|
|
||||||
|
if (phb->controller_ops.release_device)
|
||||||
|
phb->controller_ops.release_device(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user