Skip to contentSkip to conversation

drivers/video/vgastate.c

PATCH In review Jerome Steunenberg 2 participants 2 messages Jul 28, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/video/vgastate.c

This is my first patch to kernel-janitors. Please tell me if I got it all ok
In drivers/video/vgastate.c, the calls to init_module and cleanup_module have been replaced by calls to module_init and module_exit.

drivers/video/vgastate.c renamed from drivers/video/vgastate.c.orig +11 -2
@@ -491,8 +491,17 @@ int restore_vga (struct vgastate *state)
  }
 
  #ifdef MODULE
-int init_module(void) { return 0; };
-void cleanup_module(void) {};
+static int __init vgastate_init(void)
+{
+	return 0;
+}
+
+static void __exit vgastate_exit(void)
+{
+}
+
+module_init(vgastate_init);
+module_exit(vgastate_exit);
  #endif
 
  EXPORT_SYMBOL(save_vga);

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 3 lines · Jerome Steunenberg

This is my first patch to kernel-janitors. Please tell me if I got it all ok In drivers/video/vgastate.c, the calls to init_module and cleanup_module have been replaced by calls to module_init and module_exit.

"Subject" could be improved

Quoted 7 lines

--- linux-2.6.13-rc3/drivers/video/vgastate.c.orig 2005-07-25
15:09:51.000000000 +0200

Wrapped line. Try playing with your mailer settings.

Quoted 10 lines

+++ linux-2.6.13-rc3/drivers/video/vgastate.c 2005-07-26
10:15:32.000000000 +0200

drivers/video/vgastate.c renamed from drivers/video/vgastate.c.orig +2 -2
@@ -491,8 +491,17 @@ int restore_vga (struct vgastate *state)
 }
 
 #ifdef MODULE
-int init_module(void) { return 0; };
-void cleanup_module(void) {};
+static int __init vgastate_init(void)
+{

drivers/video/vgastate.c int restore_vga (struct vgastate *state) · line 505

Quoted 10 lines
drivers/video/vgastate.c renamed from drivers/video/vgastate.c.orig +9 -0
+	return 0;
+}
+
+static void __exit vgastate_exit(void)
+{
+}
+
+module_init(vgastate_init);
+module_exit(vgastate_exit);
 #endif

How about just removing it? A quick hello world module confirmed it works without these functions.

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors