[PATCH linux v4 19/20] drivers/fsi: Add client driver register utilities
Jeremy Kerr
jk at ozlabs.org
Mon Oct 17 19:12:49 AEDT 2016
Hi Chris,
> +int fsidrv_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(fsidrv_register);
> +
> +void fsidrv_unregister(struct fsi_driver *fsi_drv)
> +{
> + driver_unregister(&fsi_drv->drv);
> +}
> +EXPORT_SYMBOL_GPL(fsidrv_unregister);
> +
Minor, but I think fsi_driver_register / fsi_driver_unregister
would be better names; we don't use 'fsidrv' elsewhere.
Do we want a module_fsi_driver macro (similar to module_platform_driver)
to reduce boilerplate code?
Cheers,
Jeremy
More information about the openbmc
mailing list