tty: max3100: use module_spi_driver
authorDevendra Naga <develkernel412222@gmail.com>
Thu, 23 Aug 2012 22:04:42 +0000 (03:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2012 19:33:39 +0000 (12:33 -0700)
the driver's module init and exit functions can be replaced
with module_spi_driver as they do
only spi_register_driver and spi_unregister_driver in module's init and exit
paths.

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max3100.c

index b4902b99cfd2301793785a527561ca2caf8d8b99..46043c2521ce5de42cb182fdb1e342442553175c 100644 (file)
@@ -910,17 +910,7 @@ static struct spi_driver max3100_driver = {
        .resume         = max3100_resume,
 };
 
-static int __init max3100_init(void)
-{
-       return spi_register_driver(&max3100_driver);
-}
-module_init(max3100_init);
-
-static void __exit max3100_exit(void)
-{
-       spi_unregister_driver(&max3100_driver);
-}
-module_exit(max3100_exit);
+module_spi_driver(max3100_driver);
 
 MODULE_DESCRIPTION("MAX3100 driver");
 MODULE_AUTHOR("Christian Pellegrin <chripell@evolware.org>");