diff options
Diffstat (limited to 'sound/pci/oxygen/oxygen_lib.c')
| -rw-r--r-- | sound/pci/oxygen/oxygen_lib.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index 92e2d67f16a1..ab8738e21ad1 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c | |||
| @@ -727,9 +727,10 @@ void oxygen_pci_remove(struct pci_dev *pci) | |||
| 727 | EXPORT_SYMBOL(oxygen_pci_remove); | 727 | EXPORT_SYMBOL(oxygen_pci_remove); |
| 728 | 728 | ||
| 729 | #ifdef CONFIG_PM | 729 | #ifdef CONFIG_PM |
| 730 | int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state) | 730 | static int oxygen_pci_suspend(struct device *dev) |
| 731 | { | 731 | { |
| 732 | struct snd_card *card = pci_get_drvdata(pci); | 732 | struct pci_dev *pci = to_pci_dev(dev); |
| 733 | struct snd_card *card = dev_get_drvdata(dev); | ||
| 733 | struct oxygen *chip = card->private_data; | 734 | struct oxygen *chip = card->private_data; |
| 734 | unsigned int i, saved_interrupt_mask; | 735 | unsigned int i, saved_interrupt_mask; |
| 735 | 736 | ||
| @@ -756,10 +757,9 @@ int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state) | |||
| 756 | 757 | ||
| 757 | pci_disable_device(pci); | 758 | pci_disable_device(pci); |
| 758 | pci_save_state(pci); | 759 | pci_save_state(pci); |
| 759 | pci_set_power_state(pci, pci_choose_state(pci, state)); | 760 | pci_set_power_state(pci, PCI_D3hot); |
| 760 | return 0; | 761 | return 0; |
| 761 | } | 762 | } |
| 762 | EXPORT_SYMBOL(oxygen_pci_suspend); | ||
| 763 | 763 | ||
| 764 | static const u32 registers_to_restore[OXYGEN_IO_SIZE / 32] = { | 764 | static const u32 registers_to_restore[OXYGEN_IO_SIZE / 32] = { |
| 765 | 0xffffffff, 0x00ff077f, 0x00011d08, 0x007f00ff, | 765 | 0xffffffff, 0x00ff077f, 0x00011d08, 0x007f00ff, |
| @@ -787,9 +787,10 @@ static void oxygen_restore_ac97(struct oxygen *chip, unsigned int codec) | |||
| 787 | chip->saved_ac97_registers[codec][i]); | 787 | chip->saved_ac97_registers[codec][i]); |
| 788 | } | 788 | } |
| 789 | 789 | ||
| 790 | int oxygen_pci_resume(struct pci_dev *pci) | 790 | static int oxygen_pci_resume(struct device *dev) |
| 791 | { | 791 | { |
| 792 | struct snd_card *card = pci_get_drvdata(pci); | 792 | struct pci_dev *pci = to_pci_dev(dev); |
| 793 | struct snd_card *card = dev_get_drvdata(dev); | ||
| 793 | struct oxygen *chip = card->private_data; | 794 | struct oxygen *chip = card->private_data; |
| 794 | unsigned int i; | 795 | unsigned int i; |
| 795 | 796 | ||
| @@ -820,7 +821,9 @@ int oxygen_pci_resume(struct pci_dev *pci) | |||
| 820 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | 821 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
| 821 | return 0; | 822 | return 0; |
| 822 | } | 823 | } |
| 823 | EXPORT_SYMBOL(oxygen_pci_resume); | 824 | |
| 825 | SIMPLE_DEV_PM_OPS(oxygen_pci_pm, oxygen_pci_suspend, oxygen_pci_resume); | ||
| 826 | EXPORT_SYMBOL(oxygen_pci_pm); | ||
| 824 | #endif /* CONFIG_PM */ | 827 | #endif /* CONFIG_PM */ |
| 825 | 828 | ||
| 826 | void oxygen_pci_shutdown(struct pci_dev *pci) | 829 | void oxygen_pci_shutdown(struct pci_dev *pci) |
