diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-07-09 18:09:56 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-07-10 15:37:09 +0200 |
commit | 909346a819c5b81420d861bd53abd1140b26104e (patch) | |
tree | 229682de918115a852058ce4228862de50cb68a7 /drivers/usb/gadget/audio.c | |
parent | usb: gadget: Add helper macro for usb_composite_driver boilerplate (diff) | |
download | linux-909346a819c5b81420d861bd53abd1140b26104e.tar.xz linux-909346a819c5b81420d861bd53abd1140b26104e.zip |
usb: gadget: Convert drivers to use module_usb_composite_driver()
Use the module_usb_composite_driver() macro where applicable to
eliminate the module_init/module_exit boilerplate in USB gadget composite
drivers.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/audio.c')
-rw-r--r-- | drivers/usb/gadget/audio.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c index 231b0efe8fdc..6eb695e5e43a 100644 --- a/drivers/usb/gadget/audio.c +++ b/drivers/usb/gadget/audio.c @@ -172,17 +172,7 @@ static __refdata struct usb_composite_driver audio_driver = { .unbind = __exit_p(audio_unbind), }; -static int __init init(void) -{ - return usb_composite_probe(&audio_driver); -} -module_init(init); - -static void __exit cleanup(void) -{ - usb_composite_unregister(&audio_driver); -} -module_exit(cleanup); +module_usb_composite_driver(audio_driver); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR("Bryan Wu <cooloney@kernel.org>"); |