Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Yang Yingliang <yangyingliang@huawei.com>, alsa-devel@alsa-project.org
Cc: tiwai@suse.com, broonie@kernel.org, lgirdwood@gmail.com
Subject: Re: [PATCH -next] ASoC: ti: davinci-evm: simplify the code with module_platform_driver
Date: Fri, 13 Jan 2023 23:25:19 +0200	[thread overview]
Message-ID: <69c4d620-4b35-1ea0-c3ec-3d564d183a44@gmail.com> (raw)
In-Reply-To: <20230112135457.1490360-1-yangyingliang@huawei.com>



On 1/12/23 15:54, Yang Yingliang wrote:
> The init/exit() of driver only calls platform_driver_register/unregister,
> it can be simpilfied with module_platform_driver.

Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>

> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  sound/soc/ti/davinci-evm.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c
> index 983d69b951b0..544cb3da50eb 100644
> --- a/sound/soc/ti/davinci-evm.c
> +++ b/sound/soc/ti/davinci-evm.c
> @@ -257,18 +257,7 @@ static struct platform_driver davinci_evm_driver = {
>  	},
>  };
>  
> -static int __init evm_init(void)
> -{
> -	return platform_driver_register(&davinci_evm_driver);
> -}
> -
> -static void __exit evm_exit(void)
> -{
> -	platform_driver_unregister(&davinci_evm_driver);
> -}
> -
> -module_init(evm_init);
> -module_exit(evm_exit);
> +module_platform_driver(davinci_evm_driver);
>  
>  MODULE_AUTHOR("Vladimir Barinov");
>  MODULE_DESCRIPTION("TI DAVINCI EVM ASoC driver");

-- 
Péter

  reply	other threads:[~2023-01-13 21:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 13:54 [PATCH -next] ASoC: ti: davinci-evm: simplify the code with module_platform_driver Yang Yingliang
2023-01-13 21:25 ` Péter Ujfalusi [this message]
2023-01-19 14:29 ` Mark Brown
2023-01-30  2:22   ` Yang Yingliang
  -- strict thread matches above, loose matches on Subject: below --
2023-08-04  8:54 Yang Yingliang
2023-08-04 16:57 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69c4d620-4b35-1ea0-c3ec-3d564d183a44@gmail.com \
    --to=peter.ujfalusi@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=tiwai@suse.com \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox