Re: Patch to add mode setting to sysfs
From: James Simmons <hidden>
Date: 2005-02-21 18:37:56
Here is a question. What about if the drivers are built and fbdev is modular? I will have to try it to see the results. On Thu, 17 Feb 2005, Jon Smirl wrote:
quoted hunk ↗ jump to hunk
On Fri, 18 Feb 2005 08:04:46 +0800, Antonino A. Daplas [off-list ref] wrote:quoted
If possible, separate the sysfs patch from making fbcore as module.Split for making fbcore into a module. It's pretty minor. -- Jon Smirl jonsmirl@gmail.com diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig--- a/drivers/video/Kconfig 2005-02-17 19:11:37 -05:00 +++ b/drivers/video/Kconfig 2005-02-17 19:11:37 -05:00@@ -5,7 +5,7 @@ menu "Graphics support" config FB - bool "Support for frame buffer devices" + tristate "Support for frame buffer devices" ---help--- The frame buffer device provides an abstraction for the graphics hardware. It represents the frame buffer of some video hardware anddiff -Nru a/drivers/video/Makefile b/drivers/video/Makefile--- a/drivers/video/Makefile 2005-02-17 19:11:37 -05:00 +++ b/drivers/video/Makefile 2005-02-17 19:11:37 -05:00@@ -8,11 +8,13 @@ obj-$(CONFIG_LOGO) += logo/ obj-$(CONFIG_SYSFS) += backlight/ -obj-$(CONFIG_FB) += fbmem.o fbmon.o fbcmap.ofbsysfs.o modedb.o softcursor.o +obj-$(CONFIG_FB) += fb.o +fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o modedb.o softcursor.o # Only include macmodes.o if we have FB support and are PPC -ifeq ($(CONFIG_FB),y) -obj-$(CONFIG_PPC) += macmodes.o +ifneq ($(CONFIG_FB),n) +fb-$(CONFIG_PPC) += macmodes.o endif +fb-objs := $(fb-y) # Hardware specific drivers go first obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c--- a/drivers/video/fbmem.c 2005-02-17 19:11:37 -05:00 +++ b/drivers/video/fbmem.c 2005-02-17 19:11:37 -05:00@@ -1204,7 +1204,22 @@ } return 0; } + +void __exit +fbmem_exit(void) +{ + class_simple_destroy(fb_class); +} + +#ifdef MODULE +module_init(fbmem_init); +module_exit(fbmem_exit); +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Framebuffer base"); +#else subsys_initcall(fbmem_init); +subsys_exitcall(fbmem_exit); +#endif static char *video_options[FB_MAX]; static int ofonly;
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click