[PATCH linux v4 19/20] drivers/fsi: Add client driver register utilities

Christopher Bostic christopher.lee.bostic at gmail.com
Tue Oct 18 03:03:30 AEDT 2016


On Mon, Oct 17, 2016 at 3:12 AM, Jeremy Kerr <jk at ozlabs.org> wrote:
> 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.

Hi Jeremy,

OK will change.

>
> Do we want a module_fsi_driver macro (similar to module_platform_driver)
> to reduce boilerplate code?
>

Will add.

Thanks,
Chris

> Cheers,
>
>
> Jeremy


More information about the openbmc mailing list