Commit d91cbe83 authored by Chen Huang's avatar Chen Huang Committed by Takashi Iwai

ALSA: virtio: use module_virtio_driver() to simplify the code

module_virtio_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: default avatarChen Huang <chenhuang5@huawei.com>
Reviewed-by: default avatarAnton Yakovlev <anton.yakovlev@opensynergy.com>
Link: https://lore.kernel.org/r/20210408125429.1158703-1-chenhuang5@huawei.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 618fad3d
......@@ -432,17 +432,7 @@ static struct virtio_driver virtsnd_driver = {
#endif
};
static int __init init(void)
{
return register_virtio_driver(&virtsnd_driver);
}
module_init(init);
static void __exit fini(void)
{
unregister_virtio_driver(&virtsnd_driver);
}
module_exit(fini);
module_virtio_driver(virtsnd_driver);
MODULE_DEVICE_TABLE(virtio, id_table);
MODULE_DESCRIPTION("Virtio sound card driver");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment