-#ifdef CONFIG_PM
-static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t state)
-{
- struct fb_info *info = pci_get_drvdata(dev);
- struct nvidia_par *par = info->par;
-
- acquire_console_sem();
- par->pm_state = state.event;
-
- if (state.event == PM_EVENT_FREEZE) {
- dev->dev.power.power_state = state;
- } else {
- fb_set_suspend(info, 1);
- nvidiafb_blank(FB_BLANK_POWERDOWN, info);
- nvidia_write_regs(par, &par->SavedReg);
- pci_save_state(dev);
- pci_disable_device(dev);
- pci_set_power_state(dev, pci_choose_state(dev, state));
- }
-
- release_console_sem();
- return 0;
-}
-
-static int nvidiafb_resume(struct pci_dev *dev)
-{
- struct fb_info *info = pci_get_drvdata(dev);
- struct nvidia_par *par = info->par;
-
- acquire_console_sem();
- pci_set_power_state(dev, PCI_D0);
-
- if (par->pm_state != PM_EVENT_FREEZE) {
- pci_restore_state(dev);
- pci_enable_device(dev);
- pci_set_master(dev);
- }
-
- par->pm_state = PM_EVENT_ON;
- nvidiafb_set_par(info);
- fb_set_suspend (info, 0);
- nvidiafb_blank(FB_BLANK_UNBLANK, info);
-
- release_console_sem();
- return 0;
-}
-#else
-#define nvidiafb_suspend NULL
-#define nvidiafb_resume NULL
-#endif
-