From 0582ce92a09e826c1ac62d7e8dbc2dd72f6f99c3 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 6 Apr 2013 23:33:03 +0000 Subject: [PATCH] net: ks8851: Use module_spi_driver By using module_spi_driver we can eliminate a few lines of boilerplate code. Signed-off-by: Lars-Peter Clausen Signed-off-by: David S. Miller --- drivers/net/ethernet/micrel/ks8851.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c index 4a3b4995f19..3fd65c8a929 100644 --- a/drivers/net/ethernet/micrel/ks8851.c +++ b/drivers/net/ethernet/micrel/ks8851.c @@ -1538,19 +1538,7 @@ static struct spi_driver ks8851_driver = { .suspend = ks8851_suspend, .resume = ks8851_resume, }; - -static int __init ks8851_init(void) -{ - return spi_register_driver(&ks8851_driver); -} - -static void __exit ks8851_exit(void) -{ - spi_unregister_driver(&ks8851_driver); -} - -module_init(ks8851_init); -module_exit(ks8851_exit); +module_spi_driver(ks8851_driver); MODULE_DESCRIPTION("KS8851 Network driver"); MODULE_AUTHOR("Ben Dooks "); -- 2.20.1