#if defined(__arm__) && defined(IRQ_VSYNCPULSE) cursor_blink_rate = ARM_CURSOR_BLINK_RATE; irqres = request_irq(IRQ_VSYNCPULSE, fb_vbl_handler, SA_SHIRQ, "framebuffer vbl", info); #endif 
static const char *fbcon_startup(void){	const char *display_desc = "frame buffer device";	struct display *p = &fb_display[fg_console];	struct vc_data *vc = vc_cons[fg_console].d;	struct font_desc *font = NULL;	struct module *owner;	struct fb_info *info = NULL;	struct fbcon_ops *ops;	int rows, cols;	int irqres;	irqres = 1;	/*	 *  If num_registered_fb is zero, this is a call for the dummy part.	 *  The frame buffer devices weren't initialized yet.	 */	if (!num_registered_fb || info_idx == -1)		return display_desc;	/*	 * Instead of blindly using registered_fb[0], we use info_idx, set by	 * fb_console_init();	 */	info = registered_fb[info_idx];	if (!info)		return NULL;		owner = info->fbops->owner;	if (!try_module_get(owner))		return NULL;	if (info->fbops->fb_open && info->fbops->fb_open(info, 0)) {		module_put(owner);		return NULL;	}	ops = kmalloc(sizeof(struct fbcon_ops), GFP_KERNEL);	if (!ops) {		module_put(owner);		return NULL;	}	memset(ops, 0, sizeof(struct fbcon_ops));	ops->currcon = -1;	ops->graphics = 1;	info->fbcon_par = ops;	set_blitting_type(vc, info, NULL);	if (info->fix.type != FB_TYPE_TEXT) {		if (fbcon_softback_size) {			if (!softback_buf) {				softback_buf =				    (unsigned long)				    kmalloc(fbcon_softback_size,					    GFP_KERNEL);				if (!softback_buf) {					fbcon_softback_size = 0;					softback_top = 0;				}			}		} else {			if (softback_buf) {				kfree((void *) softback_buf);				softback_buf = 0;				softback_top = 0;			}		}		if (softback_buf)			softback_in = softback_top = softback_curr =			    softback_buf;		softback_lines = 0;	}	/* Setup default font */	if (!p->fontdata) {		if (!fontname[0] || !(font = find_font(fontname)))			font = get_default_font(info->var.xres,						info->var.yres);		vc->vc_font.width = font->width;		vc->vc_font.height = font->height;		vc->vc_font.data = p->fontdata = font->data;		vc->vc_font.charcount = 256; /* FIXME  Need to support more fonts */	}	cols = info->var.xres / vc->vc_font.width;	rows = info->var.yres / vc->vc_font.height;	vc_resize(vc, cols, rows);	DPRINTK("mode:   %s\n", info->fix.id);	DPRINTK("visual: %d\n", info->fix.visual);	DPRINTK("res:    %dx%d-%d\n", info->var.xres,		info->var.yres,		info->var.bits_per_pixel);#ifdef CONFIG_ATARI	if (MACH_IS_ATARI) {		cursor_blink_rate = ATARI_CURSOR_BLINK_RATE;		irqres =		    request_irq(IRQ_AUTO_4, fb_vbl_handler,				IRQ_TYPE_PRIO, "framebuffer vbl",				info);	}#endif				/* CONFIG_ATARI */#ifdef CONFIG_MAC	/*	 * On a Macintoy, the VBL interrupt may or may not be active. 	 * As interrupt based cursor is more reliable and race free, we 	 * probe for VBL interrupts.	 */	if (MACH_IS_MAC) {		int ct = 0;		/*		 * Probe for VBL: set temp. handler ...		 */		irqres = request_irq(IRQ_MAC_VBL, fb_vbl_detect, 0,				     "framebuffer vbl", info);		vbl_detected = 0;		/*		 * ... and spin for 20 ms ...		 */		while (!vbl_detected && ++ct < 1000)			udelay(20);		if (ct == 1000)			printk			    ("fbcon_startup: No VBL detected, using timer based cursor.\n");		free_irq(IRQ_MAC_VBL, fb_vbl_detect);		if (vbl_detected) {			/*			 * interrupt based cursor ok			 */			cursor_blink_rate = MAC_CURSOR_BLINK_RATE;			irqres =			    request_irq(IRQ_MAC_VBL, fb_vbl_handler, 0,					"framebuffer vbl", info);		} else {			/*			 * VBL not detected: fall through, use timer based cursor			 */			irqres = 1;		}	}#endif				/* CONFIG_MAC */#if defined(__arm__) && defined(IRQ_VSYNCPULSE)	cursor_blink_rate = ARM_CURSOR_BLINK_RATE;	irqres = request_irq(IRQ_VSYNCPULSE, fb_vbl_handler, SA_SHIRQ,			     "framebuffer vbl", info);#endif	/* Initialize the work queue. If the driver provides its	 * own work queue this means it will use something besides 	 * default timer to flash the cursor. */	if (!info->queue.func) {		INIT_WORK(&info->queue, fb_flashcursor, info);		init_timer(&ops->cursor_timer);		ops->cursor_timer.function = cursor_timer_handler;		ops->cursor_timer.expires = jiffies + HZ / 5;		ops->cursor_timer.data = (unsigned long ) info;		add_timer(&ops->cursor_timer);	}	return display_desc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/41359dca9442b0c664336e3fcf3aaf70b6507b1d/fbcon.c/buggy/drivers/video/console/fbcon.c