提交 b6c32f88 编写于 作者: S Sachin Kamat 提交者: John W. Linville

net: wireless: p54spi: Use module_spi_driver macro

module_spi_driver() eliminates some boiler plate and makes code
simpler.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 9c8426fc
......@@ -713,27 +713,7 @@ static struct spi_driver p54spi_driver = {
.remove = p54spi_remove,
};
static int __init p54spi_init(void)
{
int ret;
ret = spi_register_driver(&p54spi_driver);
if (ret < 0) {
printk(KERN_ERR "failed to register SPI driver: %d", ret);
goto out;
}
out:
return ret;
}
static void __exit p54spi_exit(void)
{
spi_unregister_driver(&p54spi_driver);
}
module_init(p54spi_init);
module_exit(p54spi_exit);
module_spi_driver(p54spi_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Christian Lamparter <chunkeey@web.de>");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册