All of lore.kernel.org
 help / color / mirror / Atom feed
* mdacon.c minor cleanups
@ 2002-03-23 15:42 Boris Bezlaj
  2002-03-24  5:38 ` Keith Owens
  2002-03-24 18:42 ` Dave Jones
  0 siblings, 2 replies; 10+ messages in thread
From: Boris Bezlaj @ 2002-03-23 15:42 UTC (permalink / raw)
  To: kernel-janitor-discuss; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-03-27 17:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-23 15:42 mdacon.c minor cleanups Boris Bezlaj
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

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.