From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ale.deltatee.com (ale.deltatee.com. [207.54.116.67]) by gmr-mx.google.com with ESMTPS id 130si414679itj.9.2017.07.25.13.58.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jul 2017 13:58:04 -0700 (PDT) From: Logan Gunthorpe Date: Tue, 25 Jul 2017 14:57:39 -0600 Message-Id: <20170725205753.4735-3-logang@deltatee.com> In-Reply-To: <20170725205753.4735-1-logang@deltatee.com> References: <20170725205753.4735-1-logang@deltatee.com> Subject: [PATCH v3 02/16] switchtec: export class symbol for use in upper layer driver To: linux-ntb@googlegroups.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Greg Kroah-Hartman , Kurt Schwemmer , Stephen Bates , Serge Semin , Logan Gunthorpe List-ID: 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 --- drivers/pci/switch/switchtec.c | 4 +++- include/linux/switchtec.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c index 5b75d3008ff8..39c9218d733f 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 1cbd0e63b0ab..18e388101855 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 -- 2.11.0