aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ctxfi/xfi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/ctxfi/xfi.c')
-rw-r--r--sound/pci/ctxfi/xfi.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/sound/pci/ctxfi/xfi.c b/sound/pci/ctxfi/xfi.c
index 75aa2c338410..e002183ef8b2 100644
--- a/sound/pci/ctxfi/xfi.c
+++ b/sound/pci/ctxfi/xfi.c
@@ -126,21 +126,26 @@ static void __devexit ct_card_remove(struct pci_dev *pci)
126} 126}
127 127
128#ifdef CONFIG_PM 128#ifdef CONFIG_PM
129static int ct_card_suspend(struct pci_dev *pci, pm_message_t state) 129static int ct_card_suspend(struct device *dev)
130{ 130{
131 struct snd_card *card = pci_get_drvdata(pci); 131 struct snd_card *card = dev_get_drvdata(dev);
132 struct ct_atc *atc = card->private_data; 132 struct ct_atc *atc = card->private_data;
133 133
134 return atc->suspend(atc, state); 134 return atc->suspend(atc);
135} 135}
136 136
137static int ct_card_resume(struct pci_dev *pci) 137static int ct_card_resume(struct device *dev)
138{ 138{
139 struct snd_card *card = pci_get_drvdata(pci); 139 struct snd_card *card = dev_get_drvdata(dev);
140 struct ct_atc *atc = card->private_data; 140 struct ct_atc *atc = card->private_data;
141 141
142 return atc->resume(atc); 142 return atc->resume(atc);
143} 143}
144
145static SIMPLE_DEV_PM_OPS(ct_card_pm, ct_card_suspend, ct_card_resume);
146#define CT_CARD_PM_OPS &ct_card_pm
147#else
148#define CT_CARD_PM_OPS NULL
144#endif 149#endif
145 150
146static struct pci_driver ct_driver = { 151static struct pci_driver ct_driver = {
@@ -148,10 +153,9 @@ static struct pci_driver ct_driver = {
148 .id_table = ct_pci_dev_ids, 153 .id_table = ct_pci_dev_ids,
149 .probe = ct_card_probe, 154 .probe = ct_card_probe,
150 .remove = __devexit_p(ct_card_remove), 155 .remove = __devexit_p(ct_card_remove),
151#ifdef CONFIG_PM 156 .driver = {
152 .suspend = ct_card_suspend, 157 .pm = CT_CARD_PM_OPS,
153 .resume = ct_card_resume, 158 },
154#endif
155}; 159};
156 160
157module_pci_driver(ct_driver); 161module_pci_driver(ct_driver);