summaryrefslogtreecommitdiff
path: root/include/linux/fsi.h
diff options
context:
space:
mode:
authorChristopher Bostic <cbostic@linux.vnet.ibm.com>2017-06-07 00:08:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-09 12:52:08 +0300
commit356d8009a5a4569f17a3508b50a347bdf4d5b337 (patch)
tree7c48df9d9b3c5aa590af8ce4827cf1640cacc3ea /include/linux/fsi.h
parent777dcf7391be81644360c15c375b24c96ceb49ce (diff)
downloadlinux-356d8009a5a4569f17a3508b50a347bdf4d5b337.tar.xz
drivers/fsi: Add client driver register utilities
Add driver_register and driver_unregister wrappers for FSI. Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/fsi.h')
-rw-r--r--include/linux/fsi.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/fsi.h b/include/linux/fsi.h
index 66bce4851ff6..34f1e9aea725 100644
--- a/include/linux/fsi.h
+++ b/include/linux/fsi.h
@@ -54,6 +54,18 @@ struct fsi_driver {
#define to_fsi_dev(devp) container_of(devp, struct fsi_device, dev)
#define to_fsi_drv(drvp) container_of(drvp, struct fsi_driver, drv)
+extern int fsi_driver_register(struct fsi_driver *fsi_drv);
+extern void fsi_driver_unregister(struct fsi_driver *fsi_drv);
+
+/* module_fsi_driver() - Helper macro for drivers that don't do
+ * anything special in module init/exit. This eliminates a lot of
+ * boilerplate. Each module may only use this macro once, and
+ * calling it replaces module_init() and module_exit()
+ */
+#define module_fsi_driver(__fsi_driver) \
+ module_driver(__fsi_driver, fsi_driver_register, \
+ fsi_driver_unregister)
+
extern struct bus_type fsi_bus_type;
#endif /* LINUX_FSI_H */