diff options
Diffstat (limited to 'sound/pci/vx222/vx222.c')
-rw-r--r-- | sound/pci/vx222/vx222.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index c5a25e39e3a8..ecbaf473fc1e 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c | |||
@@ -259,32 +259,17 @@ static void snd_vx222_remove(struct pci_dev *pci) | |||
259 | #ifdef CONFIG_PM_SLEEP | 259 | #ifdef CONFIG_PM_SLEEP |
260 | static int snd_vx222_suspend(struct device *dev) | 260 | static int snd_vx222_suspend(struct device *dev) |
261 | { | 261 | { |
262 | struct pci_dev *pci = to_pci_dev(dev); | ||
263 | struct snd_card *card = dev_get_drvdata(dev); | 262 | struct snd_card *card = dev_get_drvdata(dev); |
264 | struct snd_vx222 *vx = card->private_data; | 263 | struct snd_vx222 *vx = card->private_data; |
265 | int err; | ||
266 | 264 | ||
267 | err = snd_vx_suspend(&vx->core); | 265 | return snd_vx_suspend(&vx->core); |
268 | pci_disable_device(pci); | ||
269 | pci_save_state(pci); | ||
270 | pci_set_power_state(pci, PCI_D3hot); | ||
271 | return err; | ||
272 | } | 266 | } |
273 | 267 | ||
274 | static int snd_vx222_resume(struct device *dev) | 268 | static int snd_vx222_resume(struct device *dev) |
275 | { | 269 | { |
276 | struct pci_dev *pci = to_pci_dev(dev); | ||
277 | struct snd_card *card = dev_get_drvdata(dev); | 270 | struct snd_card *card = dev_get_drvdata(dev); |
278 | struct snd_vx222 *vx = card->private_data; | 271 | struct snd_vx222 *vx = card->private_data; |
279 | 272 | ||
280 | pci_set_power_state(pci, PCI_D0); | ||
281 | pci_restore_state(pci); | ||
282 | if (pci_enable_device(pci) < 0) { | ||
283 | dev_err(dev, "pci_enable_device failed, disabling device\n"); | ||
284 | snd_card_disconnect(card); | ||
285 | return -EIO; | ||
286 | } | ||
287 | pci_set_master(pci); | ||
288 | return snd_vx_resume(&vx->core); | 273 | return snd_vx_resume(&vx->core); |
289 | } | 274 | } |
290 | 275 | ||