Skip to content

Commit

Permalink
staging: xgifb: use common init for module and built-in
Browse files Browse the repository at this point in the history
Use a common init function for module and built-in driver.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 47c92d5 commit b0a7928
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -2479,9 +2479,7 @@ static int __init xgifb_init(void)
return pci_register_driver(&xgifb_driver);
}

#ifndef MODULE
module_init(xgifb_init);
#endif

/*****************************************************/
/* MODULE */
Expand Down Expand Up @@ -2509,20 +2507,12 @@ MODULE_PARM_DESC(filter,
"\nSelects TV flicker filter type (only for systems with a SiS301 video bridge).\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)
{
pci_unregister_driver(&xgifb_driver);
printk(KERN_DEBUG "xgifb: Module unloaded\n");
}

module_init(xgifb_init_module);
module_exit(xgifb_remove_module);

#endif /* /MODULE */

0 comments on commit b0a7928

Please sign in to comment.