]> git.baikalelectronics.ru Git - kernel.git/commitdiff
NTB: switchtec: Export class symbol for use in upper layer driver
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 3 Aug 2017 18:19:41 +0000 (12:19 -0600)
committerJon Mason <jdmason@kudzu.us>
Sun, 19 Nov 2017 01:37:11 +0000 (20:37 -0500)
We export the class pointer symbol and add an extern define in the
Switchtec header file.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Stephen Bates <sbates@raithlin.com>
Reviewed-by: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/pci/switch/switchtec.c
include/linux/switchtec.h

index 5b75d3008ff818a50a760699b170e0cac12fb38d..39c9218d733fcfaf9fd494462bc6faa2a62a3c41 100644 (file)
@@ -33,9 +33,11 @@ module_param(max_devices, int, 0644);
 MODULE_PARM_DESC(max_devices, "max number of switchtec device instances");
 
 static dev_t switchtec_devt;
-static struct class *switchtec_class;
 static DEFINE_IDA(switchtec_minor_ida);
 
+struct class *switchtec_class;
+EXPORT_SYMBOL_GPL(switchtec_class);
+
 enum mrpc_state {
        MRPC_IDLE = 0,
        MRPC_QUEUED,
index 1cbd0e63b0aba6547bfdcc27bcd0077dc43ecf0f..18e388101855bdc560b80c05a61f85bc3b5bab88 100644 (file)
@@ -276,4 +276,6 @@ static inline struct switchtec_dev *to_stdev(struct device *dev)
        return container_of(dev, struct switchtec_dev, dev);
 }
 
+extern struct class *switchtec_class;
+
 #endif