usb: host: max3421-hcd: Use module_spi_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 29 May 2014 11:51:01 +0000 (17:21 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2014 18:19:30 +0000 (11:19 -0700)
module_spi_driver simplifies the code by eliminating
boilerplate code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: David Mosberger <davidm@egauge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/max3421-hcd.c

index fd3ed99..858efcf 100644 (file)
@@ -1950,20 +1950,7 @@ static struct spi_driver max3421_driver = {
        },
 };
 
-static int __init
-max3421_mod_init(void)
-{
-       return spi_register_driver(&max3421_driver);
-}
-
-static void __exit
-max3421_mod_exit(void)
-{
-       spi_unregister_driver(&max3421_driver);
-}
-
-module_init(max3421_mod_init);
-module_exit(max3421_mod_exit);
+module_spi_driver(max3421_driver);
 
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_AUTHOR("David Mosberger <davidm@egauge.net>");