mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
drivers/fsi: Add client driver register utilities
Add driver_register and driver_unregister wrappers for FSI. Signed-off-by: Christopher Bostic <[email protected]> Signed-off-by: Joel Stanley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
777dcf7391
commit
356d8009a5
2 changed files with 29 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue