module_platform_driver simplifies the code by removing the boilerplate. Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx> --- drivers/staging/xillybus/xillybus_of.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_of.c b/drivers/staging/xillybus/xillybus_of.c index 92c2931..2ae045e 100644 --- a/drivers/staging/xillybus/xillybus_of.c +++ b/drivers/staging/xillybus/xillybus_of.c @@ -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); -- 1.7.9.5 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel