mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 11:33:36 -04:00
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 <gregkh@linuxfoundation.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-By: Logan Gunthorpe <logang@deltatee.com> Cc: Kurt Schwemmer <kurt.schwemmer@microsemi.com> Cc: Jon Mason <jdmason@kudzu.us> Cc: Allen Hubbe <allenbh@gmail.com>
This commit is contained in:
committed by
Bjorn Helgaas
parent
1613e604df
commit
8a74e4eaa7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user