Subject: Re: [PATCH RFC 26/28] dsa: Convert mv88e6xxx into a library allowing driver modules

From: Andrew Lunn <[email-masked]>
Date: Thu, 21 Jan 2016 22:54:09 +0100

> >> -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