INIT_LIST_HEAD(&fb_info->modelist); fb_var_to_videomode(&mode, &fb_info->var); fb_add_videomode(&mode, &fb_info->modelist); }  
fb_var_to_videomode(&mode, &fb_info->var); fb_add_videomode(&mode, &fb_info->modelist); 
register_framebuffer(struct fb_info *fb_info){	int i;	struct fb_event event;	if (num_registered_fb == FB_MAX)		return -ENXIO;	num_registered_fb++;	for (i = 0 ; i < FB_MAX; i++)		if (!registered_fb[i])			break;	fb_info->node = i;	fb_info->class_device = class_device_create(fb_class, MKDEV(FB_MAJOR, i),				    fb_info->device, "fb%d", i);	if (IS_ERR(fb_info->class_device)) {		/* Not fatal */		printk(KERN_WARNING "Unable to create class_device for framebuffer %d; errno = %ld\n", i, PTR_ERR(fb_info->class_device));		fb_info->class_device = NULL;	} else		fb_init_class_device(fb_info);	if (fb_info->pixmap.addr == NULL) {		fb_info->pixmap.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL);		if (fb_info->pixmap.addr) {			fb_info->pixmap.size = FBPIXMAPSIZE;			fb_info->pixmap.buf_align = 1;			fb_info->pixmap.scan_align = 1;			fb_info->pixmap.access_align = 32;			fb_info->pixmap.flags = FB_PIXMAP_DEFAULT;		}	}		fb_info->pixmap.offset = 0;	if (!fb_info->modelist.prev ||	    !fb_info->modelist.next ||	    list_empty(&fb_info->modelist)) {	        struct fb_videomode mode;		INIT_LIST_HEAD(&fb_info->modelist);		fb_var_to_videomode(&mode, &fb_info->var);		fb_add_videomode(&mode, &fb_info->modelist);	}	registered_fb[i] = fb_info;	devfs_mk_cdev(MKDEV(FB_MAJOR, i),			S_IFCHR | S_IRUGO | S_IWUGO, "fb/%d", i);	event.info = fb_info;	notifier_call_chain(&fb_notifier_list,			    FB_EVENT_FB_REGISTERED, &event);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/96fe6a2109db29cd15b90a093c16e6cb4b19371a/fbmem.c/buggy/drivers/video/fbmem.c