summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap.c')
-rw-r--r--drivers/video/omap.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/drivers/video/omap.c b/drivers/video/omap.c
index 884365f609..3b1ec89c38 100644
--- a/drivers/video/omap.c
+++ b/drivers/video/omap.c
@@ -1,21 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* TI Omap Frame Buffer device driver
*
* Copyright (C) 2013 Christoph Fritz <chf.fritz@googlemail.com>
* Based on work by Enrico Scholz, sponsored by Phytec
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#include <driver.h>
@@ -28,12 +16,10 @@
#include <io.h>
#include <common.h>
#include <malloc.h>
-#include <common.h>
#include <clock.h>
#include <linux/err.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap-fb.h>
+#include <video/omap-fb.h>
#include <mmu.h>
@@ -41,7 +27,7 @@
struct omapfb_device {
struct fb_info info;
- struct device_d *dev;
+ struct device *dev;
struct omapfb_display const *cur_display;
@@ -424,7 +410,7 @@ static struct fb_ops omapfb_ops = {
.fb_activate_var = omapfb_activate_var,
};
-static int omapfb_probe(struct device_d *dev)
+static int omapfb_probe(struct device *dev)
{
struct omapfb_platform_data const *pdata = dev->platform_data;
struct omapfb_device *fbi;
@@ -496,6 +482,7 @@ static int omapfb_probe(struct device_d *dev)
goto out;
}
+ info->dev.parent = dev;
rc = register_framebuffer(info);
if (rc < 0) {
dev_err(dev, "failed to register framebuffer: %d\n", rc);
@@ -512,14 +499,9 @@ out:
return rc;
}
-static struct driver_d omapfb_driver = {
+static struct driver omapfb_driver = {
.name = "omap_fb",
.probe = omapfb_probe,
};
-static int omapfb_init(void)
-{
- return platform_driver_register(&omapfb_driver);
-}
-
-device_initcall(omapfb_init);
+device_platform_driver(omapfb_driver);