> >> -module_platform_driver(mv88e6123_driver);
> >>  
> >> +static int __init mv88e6123_init(void)
> >> +{
> >> +  register_switch_driver(&mv88e6123_switch_driver);
> >> +
> >> +  return platform_driver_register(&mv88e6123_driver);
> >> +}
> >> +
> >> +static void __exit mv88e6123_exit(void)
> >> +{
> >> +  platform_driver_unregister(&mv88e6123_driver);
> >> +  unregister_switch_driver(&mv88e6123_switch_driver);
> >> +}
> >
> > I think Vivien had started something like this, but it could be nice to
> > have a helper function/macro which reduces the boilerplate code, not
> > critical for now though.
> 
> Indeed I did suggest this macro and exporting in the past, without
> success though:
> 
>     https://lkml.org/lkml/2015/5/2/152

My reworked patchset uses macros. I also had to change the order of
some of these patches. Otherwise i had modules with two init and exit
functions!

        Andrew

Reply via email to