Commit b0a79281 authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: xgifb: use common init for module and built-in

Use a common init function for module and built-in driver.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 47c92d5f
...@@ -2479,9 +2479,7 @@ static int __init xgifb_init(void) ...@@ -2479,9 +2479,7 @@ static int __init xgifb_init(void)
return pci_register_driver(&xgifb_driver); return pci_register_driver(&xgifb_driver);
} }
#ifndef MODULE
module_init(xgifb_init); module_init(xgifb_init);
#endif
/*****************************************************/ /*****************************************************/
/* MODULE */ /* MODULE */
...@@ -2509,20 +2507,12 @@ MODULE_PARM_DESC(filter, ...@@ -2509,20 +2507,12 @@ MODULE_PARM_DESC(filter,
"\nSelects TV flicker filter type (only for systems with a SiS301 video bridge).\n" "\nSelects TV flicker filter type (only for systems with a SiS301 video bridge).\n"
"(Possible values 0-7, default: [no filter])\n"); "(Possible values 0-7, default: [no filter])\n");
static int __init xgifb_init_module(void)
{
printk("\nXGIfb_init_module");
return xgifb_init();
}
static void __exit xgifb_remove_module(void) static void __exit xgifb_remove_module(void)
{ {
pci_unregister_driver(&xgifb_driver); pci_unregister_driver(&xgifb_driver);
printk(KERN_DEBUG "xgifb: Module unloaded\n"); printk(KERN_DEBUG "xgifb: Module unloaded\n");
} }
module_init(xgifb_init_module);
module_exit(xgifb_remove_module); module_exit(xgifb_remove_module);
#endif /* /MODULE */ #endif /* /MODULE */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment