net: wan: slic_ds26522: Use module_spi_driver to simplify the code
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 6 Feb 2017 15:25:52 +0000 (15:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Feb 2017 16:41:15 +0000 (11:41 -0500)
module_spi_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/slic_ds26522.c

index 9d9b4e0def2a531344c8fd3d78258e1690340350..2cdcee2be16c79834dc217ba0c357931f46fc3f3 100644 (file)
@@ -249,15 +249,4 @@ static struct spi_driver slic_ds26522_driver = {
        .id_table = slic_ds26522_id,
 };
 
-static int __init slic_ds26522_init(void)
-{
-       return spi_register_driver(&slic_ds26522_driver);
-}
-
-static void __exit slic_ds26522_exit(void)
-{
-       spi_unregister_driver(&slic_ds26522_driver);
-}
-
-module_init(slic_ds26522_init);
-module_exit(slic_ds26522_exit);
+module_spi_driver(slic_ds26522_driver);