Skip to content

Commit

Permalink
NTB: switchtec: Export class symbol for use in upper layer driver
Browse files Browse the repository at this point in the history
We export the class pointer symbol and add an extern define in the
Switchtec header file.

Signed-off-by: Logan Gunthorpe <[email protected]>
Reviewed-by: Stephen Bates <[email protected]>
Reviewed-by: Kurt Schwemmer <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Signed-off-by: Jon Mason <[email protected]>
  • Loading branch information
lsgunth authored and jonmason committed Nov 19, 2017
1 parent 5a1c269 commit 302e994
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/pci/switch/switchtec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions include/linux/switchtec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 302e994

Please sign in to comment.