All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	b.zolnierkie@samsung.com
Subject: [PATCH v2 3/6] video: fbdev: controlfb: remove obsolete module support
Date: Tue, 24 Mar 2020 14:45:05 +0100	[thread overview]
Message-ID: <20200324134508.25120-4-b.zolnierkie@samsung.com> (raw)
In-Reply-To: <20200324134508.25120-1-b.zolnierkie@samsung.com>

CONFIG_FB_CONTROL is bool, hence the Apple "control" frame buffer
driver cannot be built as a module.

Replace module_init() by device_initcall().

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/video/fbdev/controlfb.c | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c
index b347bc78bc4a..92cffd2d0219 100644
--- a/drivers/video/fbdev/controlfb.c
+++ b/drivers/video/fbdev/controlfb.c
@@ -31,7 +31,6 @@
  *  more details.
  */
 
-#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/string.h>
@@ -198,28 +197,6 @@ static const struct fb_ops controlfb_ops = {
 
 /********************  The functions for controlfb_ops ********************/
 
-#ifdef MODULE
-MODULE_LICENSE("GPL");
-
-int init_module(void)
-{
-	struct device_node *dp;
-	int ret = -ENXIO;
-
-	dp = of_find_node_by_name(NULL, "control");
-	if (dp && !control_of_init(dp))
-		ret = 0;
-	of_node_put(dp);
-
-	return ret;
-}
-
-void cleanup_module(void)
-{
-	control_cleanup();
-}
-#endif
-
 /*
  * Checks a var structure
  */
@@ -612,7 +589,7 @@ static int __init control_init(void)
 	return ret;
 }
 
-module_init(control_init);
+device_initcall(control_init);
 
 /* Work out which banks of VRAM we have installed. */
 /* danj: I guess the card just ignores writes to nonexistant VRAM... */
-- 
2.24.1


WARNING: multiple messages have this Message-ID (diff)
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	b.zolnierkie@samsung.com
Subject: [PATCH v2 3/6] video: fbdev: controlfb: remove obsolete module support
Date: Tue, 24 Mar 2020 13:45:05 +0000	[thread overview]
Message-ID: <20200324134508.25120-4-b.zolnierkie@samsung.com> (raw)
In-Reply-To: <20200324134508.25120-1-b.zolnierkie@samsung.com>

CONFIG_FB_CONTROL is bool, hence the Apple "control" frame buffer
driver cannot be built as a module.

Replace module_init() by device_initcall().

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/video/fbdev/controlfb.c | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c
index b347bc78bc4a..92cffd2d0219 100644
--- a/drivers/video/fbdev/controlfb.c
+++ b/drivers/video/fbdev/controlfb.c
@@ -31,7 +31,6 @@
  *  more details.
  */
 
-#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/string.h>
@@ -198,28 +197,6 @@ static const struct fb_ops controlfb_ops = {
 
 /********************  The functions for controlfb_ops ********************/
 
-#ifdef MODULE
-MODULE_LICENSE("GPL");
-
-int init_module(void)
-{
-	struct device_node *dp;
-	int ret = -ENXIO;
-
-	dp = of_find_node_by_name(NULL, "control");
-	if (dp && !control_of_init(dp))
-		ret = 0;
-	of_node_put(dp);
-
-	return ret;
-}
-
-void cleanup_module(void)
-{
-	control_cleanup();
-}
-#endif
-
 /*
  * Checks a var structure
  */
@@ -612,7 +589,7 @@ static int __init control_init(void)
 	return ret;
 }
 
-module_init(control_init);
+device_initcall(control_init);
 
 /* Work out which banks of VRAM we have installed. */
 /* danj: I guess the card just ignores writes to nonexistant VRAM... */
-- 
2.24.1

WARNING: multiple messages have this Message-ID (diff)
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	b.zolnierkie@samsung.com
Subject: [PATCH v2 3/6] video: fbdev: controlfb: remove obsolete module support
Date: Tue, 24 Mar 2020 14:45:05 +0100	[thread overview]
Message-ID: <20200324134508.25120-4-b.zolnierkie@samsung.com> (raw)
In-Reply-To: <20200324134508.25120-1-b.zolnierkie@samsung.com>

CONFIG_FB_CONTROL is bool, hence the Apple "control" frame buffer
driver cannot be built as a module.

Replace module_init() by device_initcall().

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/video/fbdev/controlfb.c | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c
index b347bc78bc4a..92cffd2d0219 100644
--- a/drivers/video/fbdev/controlfb.c
+++ b/drivers/video/fbdev/controlfb.c
@@ -31,7 +31,6 @@
  *  more details.
  */
 
-#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/string.h>
@@ -198,28 +197,6 @@ static const struct fb_ops controlfb_ops = {
 
 /********************  The functions for controlfb_ops ********************/
 
-#ifdef MODULE
-MODULE_LICENSE("GPL");
-
-int init_module(void)
-{
-	struct device_node *dp;
-	int ret = -ENXIO;
-
-	dp = of_find_node_by_name(NULL, "control");
-	if (dp && !control_of_init(dp))
-		ret = 0;
-	of_node_put(dp);
-
-	return ret;
-}
-
-void cleanup_module(void)
-{
-	control_cleanup();
-}
-#endif
-
 /*
  * Checks a var structure
  */
@@ -612,7 +589,7 @@ static int __init control_init(void)
 	return ret;
 }
 
-module_init(control_init);
+device_initcall(control_init);
 
 /* Work out which banks of VRAM we have installed. */
 /* danj: I guess the card just ignores writes to nonexistant VRAM... */
-- 
2.24.1

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

  parent reply	other threads:[~2020-03-24 13:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200324134518eucas1p1440c92398ddcbe5ea72d6db3703d3f97@eucas1p1.samsung.com>
2020-03-24 13:45 ` [PATCH v2 0/6] video: fbdev: controlfb: small cleanup Bartlomiej Zolnierkiewicz
2020-03-24 13:45   ` Bartlomiej Zolnierkiewicz
2020-03-24 13:45   ` Bartlomiej Zolnierkiewicz
     [not found]   ` <CGME20200324134518eucas1p16e1a39c14dfd101f5a6d86218a9e19af@eucas1p1.samsung.com>
2020-03-24 13:45     ` [PATCH v2 1/6] video: fbdev: controlfb: fix sparse warning about using incorrect type Bartlomiej Zolnierkiewicz
2020-03-24 13:45       ` Bartlomiej Zolnierkiewicz
2020-03-24 13:45       ` Bartlomiej Zolnierkiewicz
2020-03-24 20:45       ` Daniel Vetter
2020-03-24 20:45         ` Daniel Vetter
2020-03-24 20:45         ` Daniel Vetter
2020-04-17 14:07         ` Bartlomiej Zolnierkiewicz
2020-04-17 14:07           ` Bartlomiej Zolnierkiewicz
2020-04-17 14:07           ` Bartlomiej Zolnierkiewicz
     [not found]   ` <CGME20200324134518eucas1p2441fc1b4d095d4320afe5e8a86e3430f@eucas1p2.samsung.com>
2020-03-24 13:45     ` [PATCH v2 2/6] video: fbdev: controlfb: add COMPILE_TEST support Bartlomiej Zolnierkiewicz
2020-03-24 13:45       ` Bartlomiej Zolnierkiewicz
2020-03-24 13:45       ` Bartlomiej Zolnierkiewicz
     [not found]   ` <CGME20200324134519eucas1p2d606db263a636433bf1545c836bed138@eucas1p2.samsung.com>
2020-03-24 13:45     ` Bartlomiej Zolnierkiewicz [this message]
2020-03-24 13:45       ` [PATCH v2 3/6] video: fbdev: controlfb: remove obsolete module support Bartlomiej Zolnierkiewicz
2020-03-24 13:45       ` Bartlomiej Zolnierkiewicz
     [not found]   ` <CGME20200324134519eucas1p1e9b54c01e452330425f49c442e4c1b4e@eucas1p1.samsung.com>
2020-03-24 13:45     ` [PATCH v2 4/6] video: fbdev: controlfb: remove function prototypes part #1 Bartlomiej Zolnierkiewicz
2020-03-24 13:45       ` Bartlomiej Zolnierkiewicz
2020-03-24 13:45       ` Bartlomiej Zolnierkiewicz
     [not found]   ` <CGME20200324134519eucas1p24bc9d0be4182b2f0046c002920bf7cc3@eucas1p2.samsung.com>
2020-03-24 13:45     ` [PATCH v2 5/6] video: fbdev: controlfb: remove function prototypes part #2 Bartlomiej Zolnierkiewicz
2020-03-24 13:45       ` Bartlomiej Zolnierkiewicz
2020-03-24 13:45       ` Bartlomiej Zolnierkiewicz
     [not found]   ` <CGME20200324134520eucas1p2d95faa6d58939b45765ebca40d137f71@eucas1p2.samsung.com>
2020-03-24 13:45     ` [PATCH v2 6/6] video: fbdev: controlfb: remove function prototypes part #3 Bartlomiej Zolnierkiewicz
2020-03-24 13:45       ` Bartlomiej Zolnierkiewicz
2020-03-24 13:45       ` Bartlomiej Zolnierkiewicz
2020-04-17 14:07   ` [PATCH v2 0/6] video: fbdev: controlfb: small cleanup Bartlomiej Zolnierkiewicz
2020-04-17 14:07     ` Bartlomiej Zolnierkiewicz
2020-04-17 14:07     ` Bartlomiej Zolnierkiewicz

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=20200324134508.25120-4-b.zolnierkie@samsung.com \
    --to=b.zolnierkie@samsung.com \
    --cc=a.hajda@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /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.