提交 424f0750 编写于 作者: G Greg Kroah-Hartman

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: NGreg Kroah-Hartman <gregkh@suse.de>
上级 42f06a13
......@@ -211,22 +211,11 @@ static struct usb_device_id device_table[] = {
MODULE_DEVICE_TABLE(usb, device_table);
static struct usb_driver driver = {
static struct usb_driver usb_driver = {
.name = "snd-usb-6fire",
.probe = usb6fire_chip_probe,
.disconnect = usb6fire_chip_disconnect,
.id_table = device_table,
};
static int __init usb6fire_chip_init(void)
{
return usb_register(&driver);
}
static void __exit usb6fire_chip_cleanup(void)
{
usb_deregister(&driver);
}
module_init(usb6fire_chip_init);
module_exit(usb6fire_chip_cleanup);
module_usb_driver(usb_driver);
......@@ -538,16 +538,5 @@ static struct usb_driver snd_usb_driver = {
.id_table = snd_usb_id_table,
};
static int __init snd_module_init(void)
{
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)
module_usb_driver(snd_usb_driver);
......@@ -1387,16 +1387,4 @@ static struct usb_driver ua101_driver = {
#endif
};
static int __init alsa_card_ua101_init(void)
{
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);
module_usb_driver(ua101_driver);
......@@ -772,16 +772,4 @@ static struct usb_driver snd_us122l_usb_driver = {
.supports_autosuspend = 1
};
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)
module_usb_driver(snd_us122l_usb_driver);
......@@ -459,15 +459,4 @@ static void usX2Y_usb_disconnect(struct usb_device *device, void* ptr)
}
}
static int __init snd_usX2Y_module_init(void)
{
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)
module_usb_driver(snd_usX2Y_usb_driver);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册