Messages in this thread | | | Date | Fri, 13 Jan 2012 10:23:26 -0800 | From | Greg KH <> | Subject | Re: [PATCH 1/5] drivercore: Generalize module_platform_driver |
| |
On Fri, Jan 13, 2012 at 10:07:19AM +0100, Guennadi Liakhovetski wrote: > I didn't find this patch either in "next" or in Greg's "driver-core" > trees, so, couldn't generate a patch and had to comment here:
It's in Linus's tree now.
> > +/** > > + * module_driver() - Helper macro for drivers that don't do anything > > + * special in module init/exit. This eliminates a lot of boilerplate. > > + * Each module may only use this macro once, and calling it replaces > > + * module_init() and module_exit(). > > + * Use this macro to construct bus specific macros for registering > > + * drivers. > > + */ > > +#define module_driver(__driver, __register, __unregister) \ > > +static int __init __driver##_init(void) \ > > +{ \ > > + return __register(&(__driver)); \ > > +} \ > > +module_init(__driver##_init); \ > > +static void __exit __driver##_exit(void) \ > > +{ \ > > + __unregister(&(__driver)); \ > > +} \ > > +module_exit(__driver##_exit); > > Shall we maybe remove the trailing semicolon above?
Sure, but either way it doesn't really matter.
Care to send a fix-up patch that I can apply for 3.4?
thanks,
greg k-h
| |