forked from Minki/linux
ALSA: virtio: use module_virtio_driver() to simplify the code
module_virtio_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Chen Huang <chenhuang5@huawei.com> Reviewed-by: Anton Yakovlev <anton.yakovlev@opensynergy.com> Link: https://lore.kernel.org/r/20210408125429.1158703-1-chenhuang5@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
618fad3d92
commit
d91cbe83d3
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user