fb_set_cmap(&all->info.cmap, &all->info); 
static void p9100_init_one(struct sbus_dev *sdev){	struct all_info *all;	int linebytes;	all = kmalloc(sizeof(*all), GFP_KERNEL);	if (!all) {		printk(KERN_ERR "p9100: Cannot allocate memory.\n");		return;	}	memset(all, 0, sizeof(*all));	INIT_LIST_HEAD(&all->list);	spin_lock_init(&all->par.lock);	all->par.sdev = sdev;	/* This is the framebuffer and the only resource apps can mmap.  */	all->par.physbase = sdev->reg_addrs[2].phys_addr;	sbusfb_fill_var(&all->info.var, sdev->prom_node, 8);	linebytes = prom_getintdefault(sdev->prom_node, "linebytes",				       all->info.var.xres);	all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres);	all->par.regs = sbus_ioremap(&sdev->resource[0], 0,			     sizeof(struct p9100_regs), "p9100 regs");	all->info.flags = FBINFO_DEFAULT;	all->info.fbops = &p9100_ops;#ifdef CONFIG_SPARC32	all->info.screen_base = (char __iomem *)		prom_getintdefault(sdev->prom_node, "address", 0);#endif	if (!all->info.screen_base)		all->info.screen_base = sbus_ioremap(&sdev->resource[2], 0,				     all->par.fbsize, "p9100 ram");	all->info.par = &all->par;	p9100_blank(0, &all->info);	if (fb_alloc_cmap(&all->info.cmap, 256, 0)) {		printk(KERN_ERR "p9100: Could not allocate color map.\n");		kfree(all);		return;	}	p9100_init_fix(&all->info, linebytes);	if (register_framebuffer(&all->info) < 0) {		printk(KERN_ERR "p9100: Could not register framebuffer.\n");		fb_dealloc_cmap(&all->info.cmap);		kfree(all);		return;	}	list_add(&all->list, &p9100_list);	printk("p9100: %s at %lx:%lx\n",	       sdev->prom_name,	       (long) sdev->reg_addrs[0].which_io,	       (long) sdev->reg_addrs[0].phys_addr);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d85c3553df5e24cb3117385f0a17e1cc0436d148/p9100.c/buggy/drivers/video/p9100.c