From 4277f2c4667187cbbdd3da3be31ee681bc6b8300 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 26 Nov 2011 10:25:54 +0800 Subject: video: convert drivers/video/* to use module_platform_driver() This patch converts the drivers in drivers/video/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Ben Dooks Cc: Manuel Lauss Signed-off-by: Axel Lin Acked-by: Wan ZongShun Acked-by: Sascha Hauer Acked-by: Lennert Buytenhek Acked-by: Alexey Charkov Acked-by: Damian Hobson-Garcia Acked-by: Jingoo Han Signed-off-by: Florian Tobias Schandinat --- drivers/video/xilinxfb.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'drivers/video/xilinxfb.c') diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c index fcb6cd9..1808452 100644 --- a/drivers/video/xilinxfb.c +++ b/drivers/video/xilinxfb.c @@ -511,25 +511,7 @@ static struct platform_driver xilinxfb_of_driver = { }, }; - -/* --------------------------------------------------------------------- - * Module setup and teardown - */ - -static int __init -xilinxfb_init(void) -{ - return platform_driver_register(&xilinxfb_of_driver); -} - -static void __exit -xilinxfb_cleanup(void) -{ - platform_driver_unregister(&xilinxfb_of_driver); -} - -module_init(xilinxfb_init); -module_exit(xilinxfb_cleanup); +module_platform_driver(xilinxfb_of_driver); MODULE_AUTHOR("MontaVista Software, Inc. "); MODULE_DESCRIPTION("Xilinx TFT frame buffer driver"); -- cgit v1.1