summaryrefslogtreecommitdiffstats
path: root/sound/virtio
diff options
context:
space:
mode:
authorChen Huang <chenhuang5@huawei.com>2021-04-08 14:54:29 +0200
committerTakashi Iwai <tiwai@suse.de>2021-04-12 12:15:34 +0200
commitd91cbe83d319e8923d36f974d8c9b1e1b56fea62 (patch)
tree907e3252a72bee53a5decaf9f1549c239a4e47a0 /sound/virtio
parentALSA: HDA: Add access description in __snd_hda_add_vmaster (diff)
downloadlinux-d91cbe83d319e8923d36f974d8c9b1e1b56fea62.tar.xz
linux-d91cbe83d319e8923d36f974d8c9b1e1b56fea62.zip
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>
Diffstat (limited to 'sound/virtio')
-rw-r--r--sound/virtio/virtio_card.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sound/virtio/virtio_card.c b/sound/virtio/virtio_card.c
index ae9128063917..150ab3e37013 100644
--- a/sound/virtio/virtio_card.c
+++ b/sound/virtio/virtio_card.c
@@ -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");