All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: dri-devel@lists.freedesktop.org, tomi.valkeinen@ti.com,
	laurent.pinchart@ideasonboard.com
Cc: Jyri Sarha <jsarha@ti.com>
Subject: [PATCH RFC 7/9] drm/omap: dss: platform_register_drivers() to dss.c and remove core.c
Date: Fri, 16 Feb 2018 13:25:08 +0200	[thread overview]
Message-ID: <dcb796f7c9966d9eaf50d7bc6c8b7270b961f588.1518780268.git.jsarha@ti.com> (raw)
In-Reply-To: <cover.1518780267.git.jsarha@ti.com>

The core.c just for registering the drivers is kind of useless. Let's
get rid of it and register the dss drivers in dss.c.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 drivers/gpu/drm/omapdrm/dss/Makefile |  2 +-
 drivers/gpu/drm/omapdrm/dss/core.c   | 66 ------------------------------------
 drivers/gpu/drm/omapdrm/dss/dss.c    | 37 ++++++++++++++++++++
 3 files changed, 38 insertions(+), 67 deletions(-)
 delete mode 100644 drivers/gpu/drm/omapdrm/dss/core.c

diff --git a/drivers/gpu/drm/omapdrm/dss/Makefile b/drivers/gpu/drm/omapdrm/dss/Makefile
index 904101c..5950c3f 100644
--- a/drivers/gpu/drm/omapdrm/dss/Makefile
+++ b/drivers/gpu/drm/omapdrm/dss/Makefile
@@ -6,7 +6,7 @@ omapdss-base-y := base.o display.o dss-of.o output.o
 
 obj-$(CONFIG_OMAP2_DSS) += omapdss.o
 # Core DSS files
-omapdss-y := core.o dss.o dispc.o dispc_coefs.o \
+omapdss-y := dss.o dispc.o dispc_coefs.o \
 	pll.o video-pll.o
 omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o
 omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o
diff --git a/drivers/gpu/drm/omapdrm/dss/core.c b/drivers/gpu/drm/omapdrm/dss/core.c
deleted file mode 100644
index 6c9f667..0000000
--- a/drivers/gpu/drm/omapdrm/dss/core.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2009 Nokia Corporation
- * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
- *
- * Some code and ideas taken from drivers/video/omap/ driver
- * by Imre Deak.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#define DSS_SUBSYS_NAME "CORE"
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-
-#include "omapdss.h"
-#include "dss.h"
-
-/* INIT */
-static struct platform_driver * const omap_dss_drivers[] = {
-	&omap_dsshw_driver,
-	&omap_dispchw_driver,
-#ifdef CONFIG_OMAP2_DSS_DSI
-	&omap_dsihw_driver,
-#endif
-#ifdef CONFIG_OMAP2_DSS_VENC
-	&omap_venchw_driver,
-#endif
-#ifdef CONFIG_OMAP4_DSS_HDMI
-	&omapdss_hdmi4hw_driver,
-#endif
-#ifdef CONFIG_OMAP5_DSS_HDMI
-	&omapdss_hdmi5hw_driver,
-#endif
-};
-
-static int __init omap_dss_init(void)
-{
-	return platform_register_drivers(omap_dss_drivers,
-					 ARRAY_SIZE(omap_dss_drivers));
-}
-
-static void __exit omap_dss_exit(void)
-{
-	platform_unregister_drivers(omap_dss_drivers,
-				    ARRAY_SIZE(omap_dss_drivers));
-}
-
-module_init(omap_dss_init);
-module_exit(omap_dss_exit);
-
-MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
-MODULE_DESCRIPTION("OMAP2/3 Display Subsystem");
-MODULE_LICENSE("GPL v2");
-
diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c
index dda3237..162fa3a 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss.c
+++ b/drivers/gpu/drm/omapdrm/dss/dss.c
@@ -1619,3 +1619,40 @@ struct platform_driver omap_dsshw_driver = {
 		.suppress_bind_attrs = true,
 	},
 };
+
+/* INIT */
+static struct platform_driver * const omap_dss_drivers[] = {
+	&omap_dsshw_driver,
+	&omap_dispchw_driver,
+#ifdef CONFIG_OMAP2_DSS_DSI
+	&omap_dsihw_driver,
+#endif
+#ifdef CONFIG_OMAP2_DSS_VENC
+	&omap_venchw_driver,
+#endif
+#ifdef CONFIG_OMAP4_DSS_HDMI
+	&omapdss_hdmi4hw_driver,
+#endif
+#ifdef CONFIG_OMAP5_DSS_HDMI
+	&omapdss_hdmi5hw_driver,
+#endif
+};
+
+static int __init omap_dss_init(void)
+{
+	return platform_register_drivers(omap_dss_drivers,
+					 ARRAY_SIZE(omap_dss_drivers));
+}
+
+static void __exit omap_dss_exit(void)
+{
+	platform_unregister_drivers(omap_dss_drivers,
+				    ARRAY_SIZE(omap_dss_drivers));
+}
+
+module_init(omap_dss_init);
+module_exit(omap_dss_exit);
+
+MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
+MODULE_DESCRIPTION("OMAP2/3 Display Subsystem");
+MODULE_LICENSE("GPL v2");
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-02-16 11:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-16 11:25 [PATCH RFC 0/9] drm/omap: DSS6 with dynamically allocated objects Jyri Sarha
2018-02-16 11:25 ` [PATCH RFC 1/9] drm/omap: Update omapdss API to allow alternative DSS implementations Jyri Sarha
2018-02-19 12:01   ` Tomi Valkeinen
2018-02-27 14:27     ` Laurent Pinchart
2018-02-16 11:25 ` [PATCH RFC 2/9] drm/omap: Fail probe if irq registration fails Jyri Sarha
2018-02-27 14:27   ` Laurent Pinchart
2018-02-16 11:25 ` [PATCH RFC 3/9] drm/omap: Add ovl_name() and mgr_name() to dispc_ops Jyri Sarha
2018-02-27 14:35   ` Laurent Pinchart
2018-02-28 11:37     ` Tomi Valkeinen
2018-02-28 13:23       ` Laurent Pinchart
2018-02-28 14:05         ` Tomi Valkeinen
2018-02-28 14:24           ` Laurent Pinchart
2018-02-28 14:31             ` Tomi Valkeinen
2018-02-16 11:25 ` [PATCH RFC 4/9] drm/omap: Make omapdss API more generic Jyri Sarha
2018-02-19 12:41   ` Tomi Valkeinen
2018-02-16 11:25 ` [PATCH RFC 5/9] drm/omap: move common stuff from dss.h to omapdss.h Jyri Sarha
2018-02-19 12:06   ` Tomi Valkeinen
2018-02-27 14:42   ` Laurent Pinchart
2018-02-16 11:25 ` [PATCH RFC 6/9] drm/omap: dss: Move platform_device_register from core.c to dss.c probe Jyri Sarha
2018-02-27 14:46   ` Laurent Pinchart
2018-02-16 11:25 ` Jyri Sarha [this message]
2018-02-27 14:48   ` [PATCH RFC 7/9] drm/omap: dss: platform_register_drivers() to dss.c and remove core.c Laurent Pinchart
2018-02-16 11:25 ` [PATCH RFC 8/9] drm/omap: add TI DSS6 driver Jyri Sarha
2018-02-16 11:25 ` [PATCH RFC 9/9] drm/omap: boot-init: add k2g-dss Jyri Sarha
2018-02-27 14:15   ` Laurent Pinchart
2018-02-27 14:15     ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dcb796f7c9966d9eaf50d7bc6c8b7270b961f588.1518780268.git.jsarha@ti.com \
    --to=jsarha@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.