diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /sound/pci/cs5535audio/cs5535audio_pm.c | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'sound/pci/cs5535audio/cs5535audio_pm.c')
-rw-r--r-- | sound/pci/cs5535audio/cs5535audio_pm.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio_pm.c b/sound/pci/cs5535audio/cs5535audio_pm.c index 6c34def5986..185b0008832 100644 --- a/sound/pci/cs5535audio/cs5535audio_pm.c +++ b/sound/pci/cs5535audio/cs5535audio_pm.c | |||
@@ -55,10 +55,9 @@ static void snd_cs5535audio_stop_hardware(struct cs5535audio *cs5535au) | |||
55 | 55 | ||
56 | } | 56 | } |
57 | 57 | ||
58 | static int snd_cs5535audio_suspend(struct device *dev) | 58 | int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state) |
59 | { | 59 | { |
60 | struct pci_dev *pci = to_pci_dev(dev); | 60 | struct snd_card *card = pci_get_drvdata(pci); |
61 | struct snd_card *card = dev_get_drvdata(dev); | ||
62 | struct cs5535audio *cs5535au = card->private_data; | 61 | struct cs5535audio *cs5535au = card->private_data; |
63 | int i; | 62 | int i; |
64 | 63 | ||
@@ -78,14 +77,13 @@ static int snd_cs5535audio_suspend(struct device *dev) | |||
78 | return -EIO; | 77 | return -EIO; |
79 | } | 78 | } |
80 | pci_disable_device(pci); | 79 | pci_disable_device(pci); |
81 | pci_set_power_state(pci, PCI_D3hot); | 80 | pci_set_power_state(pci, pci_choose_state(pci, state)); |
82 | return 0; | 81 | return 0; |
83 | } | 82 | } |
84 | 83 | ||
85 | static int snd_cs5535audio_resume(struct device *dev) | 84 | int snd_cs5535audio_resume(struct pci_dev *pci) |
86 | { | 85 | { |
87 | struct pci_dev *pci = to_pci_dev(dev); | 86 | struct snd_card *card = pci_get_drvdata(pci); |
88 | struct snd_card *card = dev_get_drvdata(dev); | ||
89 | struct cs5535audio *cs5535au = card->private_data; | 87 | struct cs5535audio *cs5535au = card->private_data; |
90 | u32 tmp; | 88 | u32 tmp; |
91 | int timeout; | 89 | int timeout; |
@@ -131,4 +129,3 @@ static int snd_cs5535audio_resume(struct device *dev) | |||
131 | return 0; | 129 | return 0; |
132 | } | 130 | } |
133 | 131 | ||
134 | SIMPLE_DEV_PM_OPS(snd_cs5535audio_pm, snd_cs5535audio_suspend, snd_cs5535audio_resume); | ||