Re: [PATCH] Allow core fb to be built as a module
From: Paul Mundt <hidden>
Date: 2005-03-02 17:51:04
On Wed, Mar 02, 2005 at 12:28:48PM -0500, Jon Smirl wrote:
quoted hunk ↗ jump to hunk
Then it is needs (FB = y) like this... If you leave them as checks they will be built and linked into the FB module. [jonsmirl@jonsmirl video]$ bk diffs -u ===== Kconfig 1.76 vs edited =====--- 1.76/drivers/video/Kconfig 2005-02-17 19:09:04 -05:00 +++ edited/Kconfig 2005-03-02 12:25:28 -05:00@@ -269,11 +269,11 @@ config FB_ASILIANT bool "Chips 69000 display support" - depends on FB && PCI + depends on (FB = y) && PCI
There's no reason asiliantfb can't be a module, lets get that cleaned up instead.. It would also be nice to get this fb_get_options() stuff done in a clean way, having all these MODULE ifdefs/ifndefs here is just as ugly as when the module_init()'s had them. drivers/video/Kconfig | 2 +- drivers/video/asiliantfb.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) ===== drivers/video/Kconfig 1.74 vs edited =====
--- 1.74/drivers/video/Kconfig 2005-01-31 08:33:42 +02:00
+++ edited/drivers/video/Kconfig 2005-03-02 19:43:54 +02:00@@ -268,7 +268,7 @@ 65550 graphics chip in PowerBooks. config FB_ASILIANT - bool "Chips 69000 display support" + tristate "Chips 69000 display support" depends on FB && PCI config FB_IMSTT
===== drivers/video/asiliantfb.c 1.6 vs edited =====
--- 1.6/drivers/video/asiliantfb.c 2004-10-29 11:13:41 +03:00
+++ edited/drivers/video/asiliantfb.c 2005-03-02 19:49:50 +02:00@@ -606,17 +606,20 @@ int __init asiliantfb_init(void) { +#ifndef MODULE if (fb_get_options("asiliantfb", NULL)) return -ENODEV; +#endif - return pci_module_init(&asiliantfb_driver); + return pci_register_driver(&asiliantfb_driver); } -module_init(asiliantfb_init); - static void __exit asiliantfb_exit(void) { pci_unregister_driver(&asiliantfb_driver); } + +module_init(asiliantfb_init); +module_exit(asiliantfb_exit); MODULE_LICENSE("GPL");
Attachments
- (unnamed) [application/pgp-signature] 189 bytes