Skip to content

Commit d91cbe8

Browse files
Chen Huangtiwai
authored andcommitted
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 <[email protected]> Reviewed-by: Anton Yakovlev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 618fad3 commit d91cbe8

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

sound/virtio/virtio_card.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -432,17 +432,7 @@ static struct virtio_driver virtsnd_driver = {
432432
#endif
433433
};
434434

435-
static int __init init(void)
436-
{
437-
return register_virtio_driver(&virtsnd_driver);
438-
}
439-
module_init(init);
440-
441-
static void __exit fini(void)
442-
{
443-
unregister_virtio_driver(&virtsnd_driver);
444-
}
445-
module_exit(fini);
435+
module_virtio_driver(virtsnd_driver);
446436

447437
MODULE_DEVICE_TABLE(virtio, id_table);
448438
MODULE_DESCRIPTION("Virtio sound card driver");

0 commit comments

Comments
 (0)