net: au1k_ir: Use module_platform_driver()
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 20 Mar 2013 01:41:30 +0000 (01:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Mar 2013 17:25:36 +0000 (13:25 -0400)
module_platform_driver macro removes some boilerplate and
simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/au1k_ir.c

index 56f1e6d..7a1f684 100644 (file)
@@ -953,18 +953,7 @@ static struct platform_driver au1k_irda_driver = {
        .remove         = au1k_irda_remove,
 };
 
-static int __init au1k_irda_load(void)
-{
-       return platform_driver_register(&au1k_irda_driver);
-}
-
-static void __exit au1k_irda_unload(void)
-{
-       return platform_driver_unregister(&au1k_irda_driver);
-}
+module_platform_driver(au1k_irda_driver);
 
 MODULE_AUTHOR("Pete Popov <ppopov@mvista.com>");
 MODULE_DESCRIPTION("Au1000 IrDA Device Driver");
-
-module_init(au1k_irda_load);
-module_exit(au1k_irda_unload);