[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160121215409.GM9991@lunn.ch>
Date: Thu, 21 Jan 2016 22:54:09 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc: Florian Fainelli <f.fainelli@...il.com>, narmstrong@...libre.com,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH RFC 26/28] dsa: Convert mv88e6xxx into a library allowing
driver modules
> >> -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
Powered by blists - more mailing lists