if (state >= 3) state = 2; 
return 0; 
static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state){	struct fb_info *info = pci_get_drvdata(pdev);	struct aty128fb_par *par = info->par;	/* We don't do anything but D2, for now we return 0, but	 * we may want to change that. How do we know if the BIOS	 * can properly take care of D3 ? Also, with swsusp, we	 * know we'll be rebooted, ...	 */#ifdef CONFIG_PPC_PMAC	/* HACK ALERT ! Once I find a proper way to say to each driver	 * individually what will happen with it's PCI slot, I'll change	 * that. On laptops, the AGP slot is just unclocked, so D2 is	 * expected, while on desktops, the card is powered off	 */	if (state >= 3)		state = 2;#endif /* CONFIG_PPC_PMAC */	 	if (state != 2 || state == pdev->dev.power.power_state)		return 0;	printk(KERN_DEBUG "aty128fb: suspending...\n");		acquire_console_sem();	fb_set_suspend(info, 1);	/* Make sure engine is reset */	wait_for_idle(par);	aty128_reset_engine(par);	wait_for_idle(par);	/* Blank display and LCD */	aty128fb_blank(VESA_POWERDOWN, info);	/* Sleep */	par->asleep = 1;	par->lock_blank = 1;#ifdef CONFIG_PPC_PMAC	/* On powermac, we have hooks to properly suspend/resume AGP now,	 * use them here. We'll ultimately need some generic support here,	 * but the generic code isn't quite ready for that yet	 */	pmac_suspend_agp_for_card(pdev);#endif /* CONFIG_PPC_PMAC */	/* We need a way to make sure the fbdev layer will _not_ touch the	 * framebuffer before we put the chip to suspend state. On 2.4, I	 * used dummy fb ops, 2.5 need proper support for this at the	 * fbdev level	 */	if (state == 2)		aty128_set_suspend(par, 1);	release_console_sem();	pdev->dev.power.power_state = state;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ca078bae813dd46c0f9b102fdfb4a3384641ff48/aty128fb.c/buggy/drivers/video/aty/aty128fb.c