summaryrefslogtreecommitdiff
path: root/drivers/ntb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-10 10:20:53 +0200
committerBjorn Helgaas <bhelgaas@google.com>2024-06-10 15:03:30 -0500
commit8a74e4eaa72c14f997df6d820effb6aac400d470 (patch)
tree2a50deb46848ba635da1f690a8e6e1813b5252de /drivers/ntb
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff)
downloadlwn-8a74e4eaa72c14f997df6d820effb6aac400d470.tar.gz
lwn-8a74e4eaa72c14f997df6d820effb6aac400d470.zip
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>
Diffstat (limited to 'drivers/ntb')
-rw-r--r--drivers/ntb/hw/mscc/ntb_hw_switchtec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
index d6bbcc7b5b90..31946387badf 100644
--- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
+++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
@@ -1565,7 +1565,7 @@ static struct class_interface switchtec_interface = {
static int __init switchtec_ntb_init(void)
{
- switchtec_interface.class = switchtec_class;
+ switchtec_interface.class = &switchtec_class;
return class_interface_register(&switchtec_interface);
}
module_init(switchtec_ntb_init);