提交 c65434eb 编写于 作者: S Sudip Mukherjee 提交者: Greg Kroah-Hartman

staging: sm7xxfb: use module init and exit

use module_init() and module_exit() instead of module_pci_driver
and at the same time make way for use of kernel boot parameters.
Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f3e5df43
...@@ -113,6 +113,8 @@ static struct vesa_mode vesa_mode_table[] = { ...@@ -113,6 +113,8 @@ static struct vesa_mode vesa_mode_table[] = {
static struct screen_info smtc_scr_info; static struct screen_info smtc_scr_info;
static char *mode_option;
/* process command line options, get vga parameter */ /* process command line options, get vga parameter */
static int __init sm7xx_vga_setup(char *options) static int __init sm7xx_vga_setup(char *options)
{ {
...@@ -1017,7 +1019,29 @@ static struct pci_driver smtcfb_driver = { ...@@ -1017,7 +1019,29 @@ static struct pci_driver smtcfb_driver = {
.driver.pm = SM7XX_PM_OPS, .driver.pm = SM7XX_PM_OPS,
}; };
module_pci_driver(smtcfb_driver); static int __init sm712fb_init(void)
{
#ifndef MODULE
char *option = NULL;
if (fb_get_options("sm712fb", &option))
return -ENODEV;
if (option && *option)
mode_option = option;
#endif
sm7xx_vga_setup(mode_option);
return pci_register_driver(&smtcfb_driver);
}
module_init(sm712fb_init);
static void __exit sm712fb_exit(void)
{
pci_unregister_driver(&smtcfb_driver);
}
module_exit(sm712fb_exit);
MODULE_AUTHOR("Siliconmotion "); MODULE_AUTHOR("Siliconmotion ");
MODULE_DESCRIPTION("Framebuffer driver for SMI Graphic Cards"); MODULE_DESCRIPTION("Framebuffer driver for SMI Graphic Cards");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册