aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/cs46xx/cs46xx_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/cs46xx/cs46xx_lib.c')
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index 4fa53161b09..28b9747becc 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -3599,9 +3599,10 @@ static unsigned int saved_regs[] = {
3599 BA1_CVOL, 3599 BA1_CVOL,
3600}; 3600};
3601 3601
3602int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state) 3602static int snd_cs46xx_suspend(struct device *dev)
3603{ 3603{
3604 struct snd_card *card = pci_get_drvdata(pci); 3604 struct pci_dev *pci = to_pci_dev(dev);
3605 struct snd_card *card = dev_get_drvdata(dev);
3605 struct snd_cs46xx *chip = card->private_data; 3606 struct snd_cs46xx *chip = card->private_data;
3606 int i, amp_saved; 3607 int i, amp_saved;
3607 3608
@@ -3628,13 +3629,14 @@ int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state)
3628 3629
3629 pci_disable_device(pci); 3630 pci_disable_device(pci);
3630 pci_save_state(pci); 3631 pci_save_state(pci);
3631 pci_set_power_state(pci, pci_choose_state(pci, state)); 3632 pci_set_power_state(pci, PCI_D3hot);
3632 return 0; 3633 return 0;
3633} 3634}
3634 3635
3635int snd_cs46xx_resume(struct pci_dev *pci) 3636static int snd_cs46xx_resume(struct device *dev)
3636{ 3637{
3637 struct snd_card *card = pci_get_drvdata(pci); 3638 struct pci_dev *pci = to_pci_dev(dev);
3639 struct snd_card *card = dev_get_drvdata(dev);
3638 struct snd_cs46xx *chip = card->private_data; 3640 struct snd_cs46xx *chip = card->private_data;
3639 int amp_saved; 3641 int amp_saved;
3640#ifdef CONFIG_SND_CS46XX_NEW_DSP 3642#ifdef CONFIG_SND_CS46XX_NEW_DSP
@@ -3707,6 +3709,8 @@ int snd_cs46xx_resume(struct pci_dev *pci)
3707 snd_power_change_state(card, SNDRV_CTL_POWER_D0); 3709 snd_power_change_state(card, SNDRV_CTL_POWER_D0);
3708 return 0; 3710 return 0;
3709} 3711}
3712
3713SIMPLE_DEV_PM_OPS(snd_cs46xx_pm, snd_cs46xx_suspend, snd_cs46xx_resume);
3710#endif /* CONFIG_PM */ 3714#endif /* CONFIG_PM */
3711 3715
3712 3716