diff options
| author | Greg Kroah-Hartman <[email protected]> | 2024-06-10 10:20:53 +0200 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2024-06-10 15:03:30 -0500 |
| commit | 8a74e4eaa72c14f997df6d820effb6aac400d470 (patch) | |
| tree | 2a50deb46848ba635da1f690a8e6e1813b5252de /include/linux | |
| parent | 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff) | |
PCI: switchtec: Make switchtec_class constant
Now that the driver core allows for struct class to be in read-only memory,
we should make all 'class' structures declared at build time placing them
into read-only memory, instead of having to be dynamically allocated at
runtime.
Link: https://lore.kernel.org/r/2024061053-online-unwound-b173@gregkh
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Reviewed-By: Logan Gunthorpe <[email protected]>
Cc: Kurt Schwemmer <[email protected]>
Cc: Jon Mason <[email protected]>
Cc: Allen Hubbe <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/switchtec.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h index 8d8fac1626bd..cdb58d61c152 100644 --- a/include/linux/switchtec.h +++ b/include/linux/switchtec.h @@ -521,6 +521,6 @@ static inline struct switchtec_dev *to_stdev(struct device *dev) return container_of(dev, struct switchtec_dev, dev); } -extern struct class *switchtec_class; +extern const struct class switchtec_class; #endif |