diff options
author | Christopher Bostic <cbostic@linux.vnet.ibm.com> | 2017-06-06 16:08:48 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-09 11:52:08 +0200 |
commit | 356d8009a5a4569f17a3508b50a347bdf4d5b337 (patch) | |
tree | 7c48df9d9b3c5aa590af8ce4827cf1640cacc3ea /drivers/fsi/fsi-core.c | |
parent | 777dcf7391be81644360c15c375b24c96ceb49ce (diff) |
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 'drivers/fsi/fsi-core.c')
-rw-r--r-- | drivers/fsi/fsi-core.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c index fcb0c818524f..e9fbd9feeb3e 100644 --- a/drivers/fsi/fsi-core.c +++ b/drivers/fsi/fsi-core.c @@ -586,6 +586,23 @@ static int fsi_bus_match(struct device *dev, struct device_driver *drv) return 0; } +int fsi_driver_register(struct fsi_driver *fsi_drv) +{ + if (!fsi_drv) + return -EINVAL; + if (!fsi_drv->id_table) + return -EINVAL; + + return driver_register(&fsi_drv->drv); +} +EXPORT_SYMBOL_GPL(fsi_driver_register); + +void fsi_driver_unregister(struct fsi_driver *fsi_drv) +{ + driver_unregister(&fsi_drv->drv); +} +EXPORT_SYMBOL_GPL(fsi_driver_unregister); + struct bus_type fsi_bus_type = { .name = "fsi", .match = fsi_bus_match, |