diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-02-08 22:41:46 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2024-02-08 23:59:47 +0300 |
commit | 7adf6ac8521e2102d1d0f970c532e1bb91e1d096 (patch) | |
tree | 359ae71f79bf0b50f2dc1fc08a89453c5aab3fb6 /drivers/pci/pci-driver.c | |
parent | 6613476e225e090cc9aad49be7fa504e290dd33d (diff) | |
download | linux-7adf6ac8521e2102d1d0f970c532e1bb91e1d096.tar.xz |
PCI: Make pcie_port_bus_type const
Now that the driver core can properly handle constant struct bus_type, move
the pcie_port_bus_type variable to be a constant structure as well, placing
it into read-only memory which can not be modified at runtime.
Link: https://lore.kernel.org/r/20240208-bus_cleanup-pci2-v1-1-5e578210b6f2@marliere.net
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 51ec9e7e784f..37cfec341fce 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -1714,7 +1714,7 @@ static int pcie_port_bus_match(struct device *dev, struct device_driver *drv) return 1; } -struct bus_type pcie_port_bus_type = { +const struct bus_type pcie_port_bus_type = { .name = "pci_express", .match = pcie_port_bus_match, }; |