diff mbox series

PCI: Constify pcibus_class

Message ID 5e01f46f-266f-4fb3-be8a-8cb9e566cd75@gmail.com
State New
Headers show
Series PCI: Constify pcibus_class | expand

Commit Message

Heiner Kallweit April 13, 2024, 9:01 p.m. UTC
Constify pcibus_class. All users take a const struct class * argument.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/pci/probe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bjorn Helgaas April 17, 2024, 3:50 p.m. UTC | #1
On Sat, Apr 13, 2024 at 11:01:17PM +0200, Heiner Kallweit wrote:
> Constify pcibus_class. All users take a const struct class * argument.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

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

> ---
>  drivers/pci/probe.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 1325fbae2..4ec903291 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -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,
> -- 
> 2.44.0
>
diff mbox series

Patch

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 1325fbae2..4ec903291 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -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,