From: Wei Yongjun Date: Mon, 6 Feb 2017 15:25:52 +0000 (+0000) Subject: net: wan: slic_ds26522: Use module_spi_driver to simplify the code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c3afa9955382ea5496e8997b307690aaca6e6e2f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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);