Skip to contentSkip to conversation

fbdev: matrox: use modern module_init()

PATCH In review Arnd Bergmann 2 participants 2 messages May 14, 2021 – May 26, 2021

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

PATCH 1/1 fbdev: matrox: use modern module_init()

From: Arnd Bergmann <[email protected]>

This is one of the last drivers with a global init_module() function instead of the modern module_init() annotation. Convert it over.

---
 drivers/video/fbdev/matrox/matroxfb_base.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/video/fbdev/matrox/matroxfb_base.c +2 -3
index 4325bf7f388c..5c82611e93d9 100644
@@ -2486,8 +2486,6 @@ static int __init matroxfb_init(void)
 	return err;
 }
 
-module_init(matroxfb_init);
-
 #else
 
 /* *************************** init module code **************************** */
@@ -2572,7 +2570,7 @@ module_param_named(cmode, default_cmode, int, 0);
 MODULE_PARM_DESC(cmode, "Specify the video depth that should be used (8bit default)");
 #endif
 
-int __init init_module(void){
+static int __init matroxfb_init(void){
 
 	DBG(__func__)
 
@@ -2603,6 +2601,7 @@ int __init init_module(void){
 }
 #endif	/* MODULE */
 
+module_init(matroxfb_init);
 module_exit(matrox_done);
 EXPORT_SYMBOL(matroxfb_register_driver);
 EXPORT_SYMBOL(matroxfb_unregister_driver);
Signature · 1 line
2.29.2
#1 lore raw

Am 14.05.21 um 23:33 schrieb Arnd Bergmann:

Quoted 6 lines

From: Arnd Bergmann <[email protected]>

This is one of the last drivers with a global init_module() function instead of the modern module_init() annotation. Convert it over.

Added to drm-misc-next. Thank you.

Best regards
Thomas

Quoted 35 lines
---
  drivers/video/fbdev/matrox/matroxfb_base.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
drivers/video/fbdev/matrox/matroxfb_base.c +2 -3
index 4325bf7f388c..5c82611e93d9 100644
@@ -2486,8 +2486,6 @@ static int __init matroxfb_init(void)
  	return err;
  }
 
-module_init(matroxfb_init);
-
  #else
 
  /* *************************** init module code **************************** */
@@ -2572,7 +2570,7 @@ module_param_named(cmode, default_cmode, int, 0);
  MODULE_PARM_DESC(cmode, "Specify the video depth that should be used (8bit default)");
  #endif
 
-int __init init_module(void){
+static int __init matroxfb_init(void){
 
  	DBG(__func__)
 
@@ -2603,6 +2601,7 @@ int __init init_module(void){
  }
  #endif	/* MODULE */
 
+module_init(matroxfb_init);
  module_exit(matrox_done);
  EXPORT_SYMBOL(matroxfb_register_driver);
  EXPORT_SYMBOL(matroxfb_unregister_driver);
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer