Skip to contentSkip to conversation

PCI: Constify pcibus_class

PATCH Applied Heiner Kallweit 2 participants 2 messages Apr 13, 2024 – Apr 17, 2024 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Constify pcibus_class

Constify pcibus_class. All users take a const struct class * argument.

---
 drivers/pci/probe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/probe.c +1 -1
index 1325fbae2..4ec903291 100644
@@ -95,7 +95,7 @@ static void release_pcibus_dev(struct device *dev)
 	kfree(pci_bus);
 }
 
-static struct class pcibus_class = {
+static const struct class pcibus_class = {
 	.name		= "pci_bus",
 	.dev_release	= &release_pcibus_dev,
 	.dev_groups	= pcibus_groups,
Signature · 1 line
2.44.0
#1 lore raw
Quoted 3 lines · Heiner Kallweit

Constify pcibus_class. All users take a const struct class * argument.

Applied to pci/misc for v6.10, thanks!

Quoted 20 lines
---
 drivers/pci/probe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/probe.c +1 -1
index 1325fbae2..4ec903291 100644
@@ -95,7 +95,7 @@ static void release_pcibus_dev(struct device *dev)
 	kfree(pci_bus);
 }
 
-static struct class pcibus_class = {
+static const struct class pcibus_class = {
 	.name		= "pci_bus",
 	.dev_release	= &release_pcibus_dev,
 	.dev_groups	= pcibus_groups,
Signature · 1 line
2.44.0