From 7a620a650b975cefd1b10b2ed7144b6c480fff12 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Thu, 10 Oct 2013 09:30:04 +0530 Subject: [PATCH] staging: xillybus: Use module_platform_driver module_platform_driver simplifies the code by removing the boilerplate. Signed-off-by: Sachin Kamat Signed-off-by: Greg Kroah-Hartman --- 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 92c2931f4348..2ae045e332d4 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); -- 2.20.1