提交 a5c88780 编写于 作者: S Sachin Kamat 提交者: Mark Brown

ASoC: wm8770: Use module_spi_driver

module_spi_driver makes the code simpler by eliminating
module_init and module_exit calls.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 9bb280a2
......@@ -724,24 +724,7 @@ static struct spi_driver wm8770_spi_driver = {
.remove = __devexit_p(wm8770_spi_remove)
};
static int __init wm8770_modinit(void)
{
int ret = 0;
ret = spi_register_driver(&wm8770_spi_driver);
if (ret) {
printk(KERN_ERR "Failed to register wm8770 SPI driver: %d\n",
ret);
}
return ret;
}
module_init(wm8770_modinit);
static void __exit wm8770_exit(void)
{
spi_unregister_driver(&wm8770_spi_driver);
}
module_exit(wm8770_exit);
module_spi_driver(wm8770_spi_driver);
MODULE_DESCRIPTION("ASoC WM8770 driver");
MODULE_AUTHOR("Dimitris Papastamos <dp@opensource.wolfsonmicro.com>");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册