fb_alloc_cmap(&fb_info.cmap, 256, 0); 
/* MMIO mapping setup.  */ info->fix.mmio_start = base_addr; par->mmio = ioremap_nocache(info->fix.mmio_start, info->fix.mmio_len); if (!par->mmio) goto err_cmap; par->sfb = par->mmio + PMAGB_B_SFB; par->dac = par->mmio + PMAGB_B_BT459;  /* Frame buffer mapping setup.  */ info->fix.smem_start = base_addr + PMAGB_B_FBMEM; par->smem = ioremap_nocache(info->fix.smem_start, info->fix.smem_len); if (!par->smem) goto err_mmio_map; vid_base = sfb_read(par, SFB_REG_VID_BASE); info->screen_base = (void __iomem *)par->smem + vid_base * 0x1000; info->screen_size = info->fix.smem_len - 2 * vid_base * 0x1000;  pmagbbfb_erase_cursor(info); pmagbbfb_screen_setup(info); pmagbbfb_osc_setup(info); 
int __init pmagbbfb_init_one(int slot){	unsigned long base_addr = get_tc_base_addr(slot);	struct fb_info *info = &pmagbb_fb_info[slot];	printk("PMAGB-BA framebuffer in slot %d\n", slot);	/*	 * Framebuffer display memory base address and friends	 */	pmagbbfb_fix.smem_start = base_addr + PMAGB_B_ONBOARD_FBMEM_OFFSET;	info->par = (base_addr + PMAGB_B_BT459_OFFSET); 		/*	 * Configure the Bt459 RAM DAC	 */	pmagbbfb_erase_cursor((struct pmagb_b_ramdac_regs *) info->par);	/*	 *      Let there be consoles..	 */	info->fbops = &pmagbbfb_ops;	info->var = pmagbbfb_defined;	info->fix = pmagbbfb_fix;	info->screen_base = pmagbbfb_fix.smem_start; 	info->flags = FBINFO_DEFAULT;	fb_alloc_cmap(&fb_info.cmap, 256, 0);	if (register_framebuffer(info) < 0)		return 1;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7901c7998267d9d8c3f1b226a8c8cfd7f8e48a01/pmagb-b-fb.c/buggy/drivers/video/pmagb-b-fb.c