]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
video: pnx4008: convert drivers/video/pnx4008/* to use module_platform_driver()
authorAxel Lin <axel.lin@gmail.com>
Fri, 9 Dec 2011 02:01:15 +0000 (10:01 +0800)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Mon, 19 Dec 2011 20:21:43 +0000 (20:21 +0000)
This patch converts the drivers in drivers/video/pnx4008/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Grigory Tolstolytkin <gtolstolytkin@ru.mvista.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/pnx4008/pnxrgbfb.c
drivers/video/pnx4008/sdum.c

index b2252fea2858c732533af9063c889931ab27c895..6d30428e9cf9803d16ec06f68ff8342ab7d62958 100644 (file)
@@ -193,17 +193,6 @@ static struct platform_driver rgbfb_driver = {
        .remove = rgbfb_remove,
 };
 
-static int __init rgbfb_init(void)
-{
-       return platform_driver_register(&rgbfb_driver);
-}
-
-static void __exit rgbfb_exit(void)
-{
-       platform_driver_unregister(&rgbfb_driver);
-}
-
-module_init(rgbfb_init);
-module_exit(rgbfb_exit);
+module_platform_driver(rgbfb_driver);
 
 MODULE_LICENSE("GPL");
index 50e00395240f67b43eb93f9c7697c5ff12d60a1a..c5c741452cac16c766ac4c465f61228b2693395a 100644 (file)
@@ -856,17 +856,6 @@ static struct platform_driver sdum_driver = {
        .resume = sdum_resume,
 };
 
-int __init sdum_init(void)
-{
-       return platform_driver_register(&sdum_driver);
-}
-
-static void __exit sdum_exit(void)
-{
-       platform_driver_unregister(&sdum_driver);
-};
-
-module_init(sdum_init);
-module_exit(sdum_exit);
+module_platform_driver(sdum_driver);
 
 MODULE_LICENSE("GPL");