aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-02-17 10:43:03 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-11 07:44:52 -0400
commitd64f14e191310570264454998201a84d211f30aa (patch)
tree9205a28e51c882382decfe5034912145c7314416 /drivers/video
parent6e7e8f06b2c77dbb5d28062a174e4d67aec4b924 (diff)
OMAPFB: add __init & __exit
Change omapfb to use platform_driver_probe and add __init & __exit. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/omapfb/omapfb-main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 7f02e7f90d63..165a4be95025 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2307,7 +2307,7 @@ static int omapfb_init_display(struct omapfb2_device *fbdev,
2307 return 0; 2307 return 0;
2308} 2308}
2309 2309
2310static int omapfb_probe(struct platform_device *pdev) 2310static int __init omapfb_probe(struct platform_device *pdev)
2311{ 2311{
2312 struct omapfb2_device *fbdev = NULL; 2312 struct omapfb2_device *fbdev = NULL;
2313 int r = 0; 2313 int r = 0;
@@ -2448,7 +2448,7 @@ err0:
2448 return r; 2448 return r;
2449} 2449}
2450 2450
2451static int omapfb_remove(struct platform_device *pdev) 2451static int __exit omapfb_remove(struct platform_device *pdev)
2452{ 2452{
2453 struct omapfb2_device *fbdev = platform_get_drvdata(pdev); 2453 struct omapfb2_device *fbdev = platform_get_drvdata(pdev);
2454 2454
@@ -2462,8 +2462,7 @@ static int omapfb_remove(struct platform_device *pdev)
2462} 2462}
2463 2463
2464static struct platform_driver omapfb_driver = { 2464static struct platform_driver omapfb_driver = {
2465 .probe = omapfb_probe, 2465 .remove = __exit_p(omapfb_remove),
2466 .remove = omapfb_remove,
2467 .driver = { 2466 .driver = {
2468 .name = "omapfb", 2467 .name = "omapfb",
2469 .owner = THIS_MODULE, 2468 .owner = THIS_MODULE,
@@ -2474,7 +2473,7 @@ static int __init omapfb_init(void)
2474{ 2473{
2475 DBG("omapfb_init\n"); 2474 DBG("omapfb_init\n");
2476 2475
2477 if (platform_driver_register(&omapfb_driver)) { 2476 if (platform_driver_probe(&omapfb_driver, omapfb_probe)) {
2478 printk(KERN_ERR "failed to register omapfb driver\n"); 2477 printk(KERN_ERR "failed to register omapfb driver\n");
2479 return -ENODEV; 2478 return -ENODEV;
2480 } 2479 }