patch-2.4.0-test2 linux/drivers/video/fbcon.c
Next file: linux/drivers/video/fbmem.c
Previous file: linux/drivers/video/dnfb.c
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
Tue Jun 20 14:28:05 2000
- Orig file:
v2.4.0-test1/linux/drivers/video/fbcon.c
- Orig date:
Thu May 11 15:30:08 2000
diff -u --recursive --new-file v2.4.0-test1/linux/drivers/video/fbcon.c linux/drivers/video/fbcon.c
@@ -289,9 +289,17 @@
if (newidx != con2fb_map[unit]) {
oldfb = registered_fb[oldidx];
newfb = registered_fb[newidx];
- if (newfb->fbops->fb_open(newfb,0))
- return;
- oldfb->fbops->fb_release(oldfb,0);
+ if (newfb->fbops->owner)
+ __MOD_INC_USE_COUNT(newfb->fbops->owner);
+ if (newfb->fbops->fb_open && newfb->fbops->fb_open(newfb,0)) {
+ if (newfb->fbops->owner)
+ __MOD_DEC_USE_COUNT(newfb->fbops->owner);
+ return;
+ }
+ if (oldfb->fbops->fb_release)
+ oldfb->fbops->fb_release(oldfb,0);
+ if (oldfb->fbops->owner)
+ __MOD_DEC_USE_COUNT(oldfb->fbops->owner);
conp = fb_display[unit].conp;
fontdata = fb_display[unit].fontdata;
fontwidth = fb_display[unit]._fontwidth;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)