[PATCH 1/1] staging: emxx_udc: Use module_platform_driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



module_platform_driver removes some boiler plate and makes
code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxxx>
---
Compile tested.
---
 drivers/staging/emxx_udc/emxx_udc.c |   19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index ee0094d8cc6e..ce1b95b0abfc 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -3511,24 +3511,7 @@ static struct platform_driver udc_driver = {
 	},
 };
 
-
-
-/*-------------------------------------------------------------------------*/
-/* module */
-
-/*-------------------------------------------------------------------------*/
-static int __init udc_init(void)
-{
-	return platform_driver_register(&udc_driver);
-}
-module_init(udc_init);
-
-/*-------------------------------------------------------------------------*/
-static void __exit udc_exit(void)
-{
-	platform_driver_unregister(&udc_driver);
-}
-module_exit(udc_exit);
+module_platform_driver(udc_driver);
 
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_AUTHOR("Renesas Electronics Corporation");
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux