patch-2.2.18 linux/drivers/video/pm2fb.c

Next file: linux/drivers/video/q40fb.c
Previous file: linux/drivers/video/offb.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/video/pm2fb.c linux/drivers/video/pm2fb.c
@@ -2041,12 +2041,12 @@
 		board_table[i->board].cleanup(i);
 }
 
-__initfunc(void pm2fb_init(void)) {
+int __init pm2fb_init(void) {
 
 	memset(&fb_info, 0, sizeof(fb_info));
 	memcpy(&fb_info.current_par, &pm2fb_options.user_mode, sizeof(fb_info.current_par));
 	if (!pm2fb_conf(&fb_info))
-		return;
+		return 0;
 	pm2fb_reset(&fb_info);
 	fb_info.disp.scrollmode=SCROLL_YNOMOVE;
 	fb_info.gen.parsize=sizeof(struct pm2fb_par);
@@ -2065,7 +2065,7 @@
 	fbgen_install_cmap(0, &fb_info.gen);
 	if (register_framebuffer(&fb_info.gen.info)<0) {
 		printk("pm2fb: unable to register.\n");
-		return;
+		return 0;
 	}
 	printk("fb%d: %s (%s), using %uK of video memory.\n",
 				GET_FB_IDX(fb_info.gen.info.node),
@@ -2073,6 +2073,7 @@
 				permedia2_name,
 				(u32 )(fb_info.regions.fb_size>>10));
 	MOD_INC_USE_COUNT;
+	return 1;
 }
 
 static void __init pm2fb_mode_setup(char* options) {
@@ -2127,7 +2128,8 @@
 
 int init_module(void) {
 	if (mode) pm2fb_mode_setup(mode);
-  	pm2fb_init();
+	if (!pm2fb_init())
+		return -ENXIO;
 }
 
 void cleanup_module(void) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)