summaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-02-06 16:25:52 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-07 17:41:15 +0100
commitc3afa9955382ea5496e8997b307690aaca6e6e2f (patch)
tree5788a628d7ff64ca2520addf8c841c8881b05412 /drivers/net/wan
parentMerge branch 'dsa2-pdata' (diff)
downloadlinux-c3afa9955382ea5496e8997b307690aaca6e6e2f.tar.xz
linux-c3afa9955382ea5496e8997b307690aaca6e6e2f.zip
net: wan: slic_ds26522: Use module_spi_driver to simplify the code
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>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/slic_ds26522.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/wan/slic_ds26522.c b/drivers/net/wan/slic_ds26522.c
index 9d9b4e0def2a..2cdcee2be16c 100644
--- a/drivers/net/wan/slic_ds26522.c
+++ b/drivers/net/wan/slic_ds26522.c
@@ -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);