[PATCH -next] ASoC: ti: davinci-evm: simplify the code with module_platform_driver
Péter Ujfalusi
peter.ujfalusi at gmail.com
Fri Jan 13 22:25:19 CET 2023
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 at gmail.com>
> Signed-off-by: Yang Yingliang <yangyingliang at 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
More information about the Alsa-devel
mailing list