diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 14:49:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 14:49:46 -0400 |
commit | dd77a4ee0f3981693d4229aa1d57cea9e526ff47 (patch) | |
tree | cb486be20b950201103a03636cbb1e1d180f0098 /drivers/video/nvidia/nvidia.c | |
parent | e8216dee838c09776680a6f1a2e54d81f3cdfa14 (diff) | |
parent | 7e9f4b2d3e21e87c26025810413ef1592834e63b (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (47 commits)
Driver core: Don't call put methods while holding a spinlock
Driver core: Remove unneeded routines from driver core
Driver core: Fix potential deadlock in driver core
PCI: enable driver multi-threaded probe
Driver Core: add ability for drivers to do a threaded probe
sysfs: add proper sysfs_init() prototype
drivers/base: check errors
drivers/base: Platform notify needs to occur before drivers attach to the device
v4l-dev2: handle __must_check
add CONFIG_ENABLE_MUST_CHECK
add __must_check to device management code
Driver core: fixed add_bind_files() definition
Driver core: fix comments in drivers/base/power/resume.c
sysfs_remove_bin_file: no return value, dump_stack on error
kobject: must_check fixes
Driver core: add ability for devices to create and remove bin files
Class: add support for class interfaces for devices
Driver core: create devices/virtual/ tree
Driver core: add device_rename function
Driver core: add ability for classes to handle devices properly
...
Diffstat (limited to 'drivers/video/nvidia/nvidia.c')
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index d4f850117874..f8cd4c519aeb 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -950,24 +950,25 @@ static struct fb_ops nvidia_fb_ops = { | |||
950 | }; | 950 | }; |
951 | 951 | ||
952 | #ifdef CONFIG_PM | 952 | #ifdef CONFIG_PM |
953 | static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t state) | 953 | static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t mesg) |
954 | { | 954 | { |
955 | struct fb_info *info = pci_get_drvdata(dev); | 955 | struct fb_info *info = pci_get_drvdata(dev); |
956 | struct nvidia_par *par = info->par; | 956 | struct nvidia_par *par = info->par; |
957 | 957 | ||
958 | if (mesg.event == PM_EVENT_PRETHAW) | ||
959 | mesg.event = PM_EVENT_FREEZE; | ||
958 | acquire_console_sem(); | 960 | acquire_console_sem(); |
959 | par->pm_state = state.event; | 961 | par->pm_state = mesg.event; |
960 | 962 | ||
961 | if (state.event == PM_EVENT_FREEZE) { | 963 | if (mesg.event == PM_EVENT_SUSPEND) { |
962 | dev->dev.power.power_state = state; | ||
963 | } else { | ||
964 | fb_set_suspend(info, 1); | 964 | fb_set_suspend(info, 1); |
965 | nvidiafb_blank(FB_BLANK_POWERDOWN, info); | 965 | nvidiafb_blank(FB_BLANK_POWERDOWN, info); |
966 | nvidia_write_regs(par, &par->SavedReg); | 966 | nvidia_write_regs(par, &par->SavedReg); |
967 | pci_save_state(dev); | 967 | pci_save_state(dev); |
968 | pci_disable_device(dev); | 968 | pci_disable_device(dev); |
969 | pci_set_power_state(dev, pci_choose_state(dev, state)); | 969 | pci_set_power_state(dev, pci_choose_state(dev, mesg)); |
970 | } | 970 | } |
971 | dev->dev.power.power_state = mesg; | ||
971 | 972 | ||
972 | release_console_sem(); | 973 | release_console_sem(); |
973 | return 0; | 974 | return 0; |