linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ALSA: virtio: use module_virtio_driver() to simplify the code
@ 2021-04-08 12:54 Chen Huang
  2021-04-10 18:15 ` Anton Yakovlev
  2021-04-12 10:15 ` Takashi Iwai
  0 siblings, 2 replies; 3+ messages in thread
From: Chen Huang @ 2021-04-08 12:54 UTC (permalink / raw)
  To: Anton Yakovlev, Michael S . Tsirkin, Jaroslav Kysela, Takashi Iwai
  Cc: virtualization, alsa-devel, linux-kernel, kernel-janitors, Chen Huang

module_virtio_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Chen Huang <chenhuang5@huawei.com>
---
 sound/virtio/virtio_card.c | 12 +-----------
 1 file changed, 1 insertion(+), 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");
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] ALSA: virtio: use module_virtio_driver() to simplify the code
  2021-04-08 12:54 [PATCH -next] ALSA: virtio: use module_virtio_driver() to simplify the code Chen Huang
@ 2021-04-10 18:15 ` Anton Yakovlev
  2021-04-12 10:15 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Anton Yakovlev @ 2021-04-10 18:15 UTC (permalink / raw)
  To: Chen Huang, Michael S . Tsirkin, Jaroslav Kysela, Takashi Iwai
  Cc: virtualization, alsa-devel, linux-kernel, kernel-janitors

On 08.04.2021 14:54, Chen Huang wrote
> 
> module_virtio_driver() makes the code simpler by eliminating
> boilerplate code.
> 
> Signed-off-by: Chen Huang <chenhuang5@huawei.com>

Thanks for the patch.

Reviewed-by: Anton Yakovlev <anton.yakovlev@opensynergy.com>

> ---
>   sound/virtio/virtio_card.c | 12 +-----------
>   1 file changed, 1 insertion(+), 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");
> --
> 2.17.1
> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] ALSA: virtio: use module_virtio_driver() to simplify the code
  2021-04-08 12:54 [PATCH -next] ALSA: virtio: use module_virtio_driver() to simplify the code Chen Huang
  2021-04-10 18:15 ` Anton Yakovlev
@ 2021-04-12 10:15 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2021-04-12 10:15 UTC (permalink / raw)
  To: Chen Huang
  Cc: Anton Yakovlev, Michael S . Tsirkin, Jaroslav Kysela,
	Takashi Iwai, virtualization, alsa-devel, linux-kernel,
	kernel-janitors

On Thu, 08 Apr 2021 14:54:29 +0200,
Chen Huang wrote:
> 
> module_virtio_driver() makes the code simpler by eliminating
> boilerplate code.
> 
> Signed-off-by: Chen Huang <chenhuang5@huawei.com>

Thanks, applied now.


Takashi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-12 10:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 12:54 [PATCH -next] ALSA: virtio: use module_virtio_driver() to simplify the code Chen Huang
2021-04-10 18:15 ` Anton Yakovlev
2021-04-12 10:15 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).