USB: convert sound/* to use module_usb_driver()
This converts the drivers in sound/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Daniel Mack <zonque@gmail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Torsten Schenk <torsten.schenk@zoho.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Karsten Wiese <fzu@wemgehoertderstaat.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
42f06a1344
commit
424f0750ed
@ -211,22 +211,11 @@ static struct usb_device_id device_table[] = {
|
|||||||
|
|
||||||
MODULE_DEVICE_TABLE(usb, device_table);
|
MODULE_DEVICE_TABLE(usb, device_table);
|
||||||
|
|
||||||
static struct usb_driver driver = {
|
static struct usb_driver usb_driver = {
|
||||||
.name = "snd-usb-6fire",
|
.name = "snd-usb-6fire",
|
||||||
.probe = usb6fire_chip_probe,
|
.probe = usb6fire_chip_probe,
|
||||||
.disconnect = usb6fire_chip_disconnect,
|
.disconnect = usb6fire_chip_disconnect,
|
||||||
.id_table = device_table,
|
.id_table = device_table,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init usb6fire_chip_init(void)
|
module_usb_driver(usb_driver);
|
||||||
{
|
|
||||||
return usb_register(&driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit usb6fire_chip_cleanup(void)
|
|
||||||
{
|
|
||||||
usb_deregister(&driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(usb6fire_chip_init);
|
|
||||||
module_exit(usb6fire_chip_cleanup);
|
|
||||||
|
@ -538,16 +538,5 @@ static struct usb_driver snd_usb_driver = {
|
|||||||
.id_table = snd_usb_id_table,
|
.id_table = snd_usb_id_table,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init snd_module_init(void)
|
module_usb_driver(snd_usb_driver);
|
||||||
{
|
|
||||||
return usb_register(&snd_usb_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit snd_module_exit(void)
|
|
||||||
{
|
|
||||||
usb_deregister(&snd_usb_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(snd_module_init)
|
|
||||||
module_exit(snd_module_exit)
|
|
||||||
|
|
||||||
|
@ -1387,16 +1387,4 @@ static struct usb_driver ua101_driver = {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init alsa_card_ua101_init(void)
|
module_usb_driver(ua101_driver);
|
||||||
{
|
|
||||||
return usb_register(&ua101_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit alsa_card_ua101_exit(void)
|
|
||||||
{
|
|
||||||
usb_deregister(&ua101_driver);
|
|
||||||
mutex_destroy(&devices_mutex);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(alsa_card_ua101_init);
|
|
||||||
module_exit(alsa_card_ua101_exit);
|
|
||||||
|
@ -772,16 +772,4 @@ static struct usb_driver snd_us122l_usb_driver = {
|
|||||||
.supports_autosuspend = 1
|
.supports_autosuspend = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module_usb_driver(snd_us122l_usb_driver);
|
||||||
static int __init snd_us122l_module_init(void)
|
|
||||||
{
|
|
||||||
return usb_register(&snd_us122l_usb_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit snd_us122l_module_exit(void)
|
|
||||||
{
|
|
||||||
usb_deregister(&snd_us122l_usb_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(snd_us122l_module_init)
|
|
||||||
module_exit(snd_us122l_module_exit)
|
|
||||||
|
@ -459,15 +459,4 @@ static void usX2Y_usb_disconnect(struct usb_device *device, void* ptr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init snd_usX2Y_module_init(void)
|
module_usb_driver(snd_usX2Y_usb_driver);
|
||||||
{
|
|
||||||
return usb_register(&snd_usX2Y_usb_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit snd_usX2Y_module_exit(void)
|
|
||||||
{
|
|
||||||
usb_deregister(&snd_usX2Y_usb_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(snd_usX2Y_module_init)
|
|
||||||
module_exit(snd_usX2Y_module_exit)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user