ALSA: Convert to new pm_ops for PCI drivers
Straightforward conversion to the new pm_ops from the legacy suspend/resume ops. Since we change vx222, vx_core and vxpocket have to be converted, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -3920,9 +3920,10 @@ static void snd_trident_clear_voices(struct snd_trident * trident, unsigned shor
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
int snd_trident_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
static int snd_trident_suspend(struct device *dev)
|
||||
{
|
||||
struct snd_card *card = pci_get_drvdata(pci);
|
||||
struct pci_dev *pci = to_pci_dev(dev);
|
||||
struct snd_card *card = dev_get_drvdata(dev);
|
||||
struct snd_trident *trident = card->private_data;
|
||||
|
||||
trident->in_suspend = 1;
|
||||
@@ -3936,13 +3937,14 @@ int snd_trident_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
pci_set_power_state(pci, PCI_D3hot);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_trident_resume(struct pci_dev *pci)
|
||||
static int snd_trident_resume(struct device *dev)
|
||||
{
|
||||
struct snd_card *card = pci_get_drvdata(pci);
|
||||
struct pci_dev *pci = to_pci_dev(dev);
|
||||
struct snd_card *card = dev_get_drvdata(dev);
|
||||
struct snd_trident *trident = card->private_data;
|
||||
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
@@ -3979,4 +3981,6 @@ int snd_trident_resume(struct pci_dev *pci)
|
||||
trident->in_suspend = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
SIMPLE_DEV_PM_OPS(snd_trident_pm, snd_trident_suspend, snd_trident_resume);
|
||||
#endif /* CONFIG_PM */
|
||||
|
Reference in New Issue
Block a user