ASoC: ti: davinci-evm: simplify the code with module_platform_driver

The init/exit() of driver only calls platform_driver_register/unregister,
it can be simpilfied with module_platform_driver.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230804085402.1328033-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Yang Yingliang 2023-08-04 16:54:02 +08:00 committed by Mark Brown
parent 422f10adc3
commit 9606cda350
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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");