staging: xillybus: Use module_platform_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 10 Oct 2013 04:00:04 +0000 (09:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2013 22:23:14 +0000 (15:23 -0700)
module_platform_driver simplifies the code by removing the boilerplate.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xillybus/xillybus_of.c

index 92c2931..2ae045e 100644 (file)
@@ -198,15 +198,4 @@ static struct platform_driver xillybus_platform_driver = {
        },
 };
 
-static int __init xillybus_of_init(void)
-{
-       return platform_driver_register(&xillybus_platform_driver);
-}
-
-static void __exit xillybus_of_exit(void)
-{
-       platform_driver_unregister(&xillybus_platform_driver);
-}
-
-module_init(xillybus_of_init);
-module_exit(xillybus_of_exit);
+module_platform_driver(xillybus_platform_driver);