Re: [RFC] USB: create module_usb_serial_driver macro

From: Lars-Peter Clausen
Date: Sat Feb 25 2012 - 06:54:33 EST


On 02/25/2012 12:38 AM, Greg KH wrote:
> Now that Alan Stern has cleaned up the usb serial driver registration,
> we have the ability to create a module_usb_serial_driver macro to make
> things a bit simpler, like the other *_driver macros created.
>
> But, as we need two functions here, we can't reuse the existing
> module_driver() macro, so we need to roll our own.
>
> Lars-Peter, or anyone else, am I missing something here and we can use
> module_driver() somehow, or even modify it, to work for subsystems that
> need 2 parameters for their function calls to register/deregister?
>

I suppose we can make module_driver a variadic macro and pass any additional
parameters to the register and unregister functions. Patch attached.

- Lars

8<-------------------------------------------------------------------->8