From: Boris Bezlaj <boris@kista.gajba.net>
To: kernel-janitor-discuss <kernel-janitor-discuss@lists.sourceforge.net>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: mdacon.c minor cleanups
Date: Sat, 23 Mar 2002 16:42:20 +0100 [thread overview]
Message-ID: <20020323164220.742414d2.boris@kista.gajba.net> (raw)
Hi
Im resending mdacon.c patch if anyone is interested including it..
Its just a small cleanup(a part of kernel-janitor TODO).
Added module description, module_init/exit(), printk() parameters,...
Tested on 2.4.x, but not on 2.5(patches/compiles fine..)
Flames/improvements welcome..
Boris B.
--- drivers/video/mdacon.c.orig Fri Sep 14 01:04:43 2001
+++ drivers/video/mdacon.c Thu Feb 14 18:07:20 2002
@@ -78,7 +78,7 @@
static int mda_first_vc = 13;
static int mda_last_vc = 16;
-static struct vc_data *mda_display_fg = NULL;
+static struct vc_data *mda_display_fg;
MODULE_PARM(mda_first_vc, "1-255i");
MODULE_PARM(mda_last_vc, "1-255i");
@@ -338,7 +338,7 @@
mda_type_name = "MDA";
if (! mda_detect()) {
- printk("mdacon: MDA card not detected.\n");
+ printk(KERN_WARNING __FILE__ ": MDA card not detected.\n");
return NULL;
}
@@ -349,7 +349,7 @@
/* cursor looks ugly during boot-up, so turn it off */
mda_set_cursor(mda_vram_len - 1);
- printk("mdacon: %s with %ldK of memory detected.\n",
+ printk(KERN_INFO __FILE__ ": %s with %ldK of memory detected.\n",
mda_type_name, mda_vram_len/1024);
return "MDA-2";
@@ -605,28 +605,23 @@
con_invert_region: mdacon_invert_region,
};
-void __init mda_console_init(void)
+int __init mda_console_init(void)
{
if (mda_first_vc > mda_last_vc)
- return;
+ return -EINVAL;
take_over_console(&mda_con, mda_first_vc-1, mda_last_vc-1, 0);
-}
-
-#ifdef MODULE
-
-MODULE_LICENSE("GPL");
-
-int init_module(void)
-{
- mda_console_init();
-
return 0;
}
-void cleanup_module(void)
+void __exit mda_console_exit(void)
{
give_up_console(&mda_con);
}
+#ifdef MODULE
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("MDA console driver. Default console allocation: vc/13 - vc/16");
+module_init(mda_console_init);
+module_exit(mda_console_exit);
#endif
next reply other threads:[~2002-03-23 15:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-23 15:42 Boris Bezlaj [this message]
2002-03-24 5:38 ` Keith Owens
2002-03-24 18:42 ` Dave Jones
2002-03-24 18:59 ` Daniel Jacobowitz
2002-03-25 7:53 ` Zwane Mwaikambo
2002-03-25 15:50 ` Boris
2002-03-25 16:05 ` Zwane Mwaikambo
2002-03-27 9:17 ` Matan
2002-03-27 9:35 ` Zwane Mwaikambo
2002-03-27 17:56 ` Boris
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=20020323164220.742414d2.boris@kista.gajba.net \
--to=boris@kista.gajba.net \
--cc=kernel-janitor-discuss@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®