From: Logan Gunthorpe Date: Thu, 3 Aug 2017 18:19:41 +0000 (-0600) Subject: NTB: switchtec: Export class symbol for use in upper layer driver X-Git-Tag: v4.19~2120^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=302e994d3af7e4be8d0f789aa66422166ccd89c2;p=platform%2Fkernel%2Flinux-rpi.git NTB: switchtec: Export class symbol for use in upper layer driver We export the class pointer symbol and add an extern define in the Switchtec header file. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Bjorn Helgaas Signed-off-by: Jon Mason --- diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c index 5b75d30..39c9218 100644 --- a/drivers/pci/switch/switchtec.c +++ b/drivers/pci/switch/switchtec.c @@ -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, diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h index 1cbd0e6..18e3881 100644 --- a/include/linux/switchtec.h +++ b/include/linux/switchtec.h @@ -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