From: Aaro Koskinen Date: Mon, 29 Aug 2011 20:14:34 +0000 (+0300) Subject: staging: xgifb: use common init for module and built-in X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b0a792818023a8d5f76a6867d9fd052a7f7dc76f;p=mv-sheeva.git staging: xgifb: use common init for module and built-in Use a common init function for module and built-in driver. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 7702293c5d8..db9d27b04ce 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -2479,9 +2479,7 @@ static int __init xgifb_init(void) return pci_register_driver(&xgifb_driver); } -#ifndef MODULE module_init(xgifb_init); -#endif /*****************************************************/ /* MODULE */ @@ -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 */