Message ID | 20240529164103.31671-5-Jonathan.Cameron@huawei.com |
---|---|
State | New |
Headers | show |
Series | pci: portdrv: Add auxiliary bus and register CXL PMUs (and aer) | expand |
diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c index d3a2c40c2f12..5bde62918dad 100644 --- a/drivers/base/auxiliary.c +++ b/drivers/base/auxiliary.c @@ -244,7 +244,7 @@ static void auxiliary_bus_shutdown(struct device *dev) auxdrv->shutdown(auxdev); } -static const struct bus_type auxiliary_bus_type = { +const struct bus_type auxiliary_bus_type = { .name = "auxiliary", .probe = auxiliary_bus_probe, .remove = auxiliary_bus_remove, diff --git a/include/linux/auxiliary_bus.h b/include/linux/auxiliary_bus.h index de21d9d24a95..465b5ac2862e 100644 --- a/include/linux/auxiliary_bus.h +++ b/include/linux/auxiliary_bus.h @@ -248,4 +248,5 @@ struct auxiliary_device *auxiliary_find_device(struct device *start, const void *data, int (*match)(struct device *dev, const void *data)); +extern const struct bus_type auxiliary_bus_type; #endif /* _AUXILIARY_BUS_H_ */
In the PCI portdrv shutdown we need to find and remove any auxiliary devices before pci_free_irq_vectors() is called. Allowing the bus type to be accessed means we can just use the device types on the auxbus to do this without having to keep yet another list of what is registered. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> --- drivers/base/auxiliary.c | 2 +- include/linux/auxiliary_bus.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)