Skip to content

Commit

Permalink
OMAPFB: add __init & __exit
Browse files Browse the repository at this point in the history
Change omapfb to use platform_driver_probe and add __init & __exit.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Tomi Valkeinen committed May 11, 2012
1 parent 6e7e8f0 commit d64f14e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/video/omap2/omapfb/omapfb-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2307,7 +2307,7 @@ static int omapfb_init_display(struct omapfb2_device *fbdev,
return 0;
}

static int omapfb_probe(struct platform_device *pdev)
static int __init omapfb_probe(struct platform_device *pdev)
{
struct omapfb2_device *fbdev = NULL;
int r = 0;
Expand Down Expand Up @@ -2448,7 +2448,7 @@ static int omapfb_probe(struct platform_device *pdev)
return r;
}

static int omapfb_remove(struct platform_device *pdev)
static int __exit omapfb_remove(struct platform_device *pdev)
{
struct omapfb2_device *fbdev = platform_get_drvdata(pdev);

Expand All @@ -2462,8 +2462,7 @@ static int omapfb_remove(struct platform_device *pdev)
}

static struct platform_driver omapfb_driver = {
.probe = omapfb_probe,
.remove = omapfb_remove,
.remove = __exit_p(omapfb_remove),
.driver = {
.name = "omapfb",
.owner = THIS_MODULE,
Expand All @@ -2474,7 +2473,7 @@ static int __init omapfb_init(void)
{
DBG("omapfb_init\n");

if (platform_driver_register(&omapfb_driver)) {
if (platform_driver_probe(&omapfb_driver, omapfb_probe)) {
printk(KERN_ERR "failed to register omapfb driver\n");
return -ENODEV;
}
Expand Down

0 comments on commit d64f14e

Please sign in to comment.