aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ctxfi
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/ctxfi')
-rw-r--r--sound/pci/ctxfi/ctatc.c4
-rw-r--r--sound/pci/ctxfi/ctatc.h2
-rw-r--r--sound/pci/ctxfi/cthardware.h2
-rw-r--r--sound/pci/ctxfi/cthw20k1.c4
-rw-r--r--sound/pci/ctxfi/cthw20k2.c4
-rw-r--r--sound/pci/ctxfi/xfi.c22
6 files changed, 21 insertions, 17 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index d8a4423539ce..8e40262d4117 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -1537,7 +1537,7 @@ static void atc_connect_resources(struct ct_atc *atc)
1537} 1537}
1538 1538
1539#ifdef CONFIG_PM 1539#ifdef CONFIG_PM
1540static int atc_suspend(struct ct_atc *atc, pm_message_t state) 1540static int atc_suspend(struct ct_atc *atc)
1541{ 1541{
1542 int i; 1542 int i;
1543 struct hw *hw = atc->hw; 1543 struct hw *hw = atc->hw;
@@ -1553,7 +1553,7 @@ static int atc_suspend(struct ct_atc *atc, pm_message_t state)
1553 1553
1554 atc_release_resources(atc); 1554 atc_release_resources(atc);
1555 1555
1556 hw->suspend(hw, state); 1556 hw->suspend(hw);
1557 1557
1558 return 0; 1558 return 0;
1559} 1559}
diff --git a/sound/pci/ctxfi/ctatc.h b/sound/pci/ctxfi/ctatc.h
index 3a0def656af0..653e813ad142 100644
--- a/sound/pci/ctxfi/ctatc.h
+++ b/sound/pci/ctxfi/ctatc.h
@@ -144,7 +144,7 @@ struct ct_atc {
144 struct ct_timer *timer; 144 struct ct_timer *timer;
145 145
146#ifdef CONFIG_PM 146#ifdef CONFIG_PM
147 int (*suspend)(struct ct_atc *atc, pm_message_t state); 147 int (*suspend)(struct ct_atc *atc);
148 int (*resume)(struct ct_atc *atc); 148 int (*resume)(struct ct_atc *atc);
149#define NUM_PCMS (NUM_CTALSADEVS - 1) 149#define NUM_PCMS (NUM_CTALSADEVS - 1)
150 struct snd_pcm *pcms[NUM_PCMS]; 150 struct snd_pcm *pcms[NUM_PCMS];
diff --git a/sound/pci/ctxfi/cthardware.h b/sound/pci/ctxfi/cthardware.h
index 908315bec3b4..c56fe533b3f3 100644
--- a/sound/pci/ctxfi/cthardware.h
+++ b/sound/pci/ctxfi/cthardware.h
@@ -73,7 +73,7 @@ struct hw {
73 int (*card_stop)(struct hw *hw); 73 int (*card_stop)(struct hw *hw);
74 int (*pll_init)(struct hw *hw, unsigned int rsr); 74 int (*pll_init)(struct hw *hw, unsigned int rsr);
75#ifdef CONFIG_PM 75#ifdef CONFIG_PM
76 int (*suspend)(struct hw *hw, pm_message_t state); 76 int (*suspend)(struct hw *hw);
77 int (*resume)(struct hw *hw, struct card_conf *info); 77 int (*resume)(struct hw *hw, struct card_conf *info);
78#endif 78#endif
79 int (*is_adc_source_selected)(struct hw *hw, enum ADCSRC source); 79 int (*is_adc_source_selected)(struct hw *hw, enum ADCSRC source);
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c
index a7df19791f5a..dc1969bc67d4 100644
--- a/sound/pci/ctxfi/cthw20k1.c
+++ b/sound/pci/ctxfi/cthw20k1.c
@@ -2086,7 +2086,7 @@ static int hw_card_init(struct hw *hw, struct card_conf *info)
2086} 2086}
2087 2087
2088#ifdef CONFIG_PM 2088#ifdef CONFIG_PM
2089static int hw_suspend(struct hw *hw, pm_message_t state) 2089static int hw_suspend(struct hw *hw)
2090{ 2090{
2091 struct pci_dev *pci = hw->pci; 2091 struct pci_dev *pci = hw->pci;
2092 2092
@@ -2099,7 +2099,7 @@ static int hw_suspend(struct hw *hw, pm_message_t state)
2099 2099
2100 pci_disable_device(pci); 2100 pci_disable_device(pci);
2101 pci_save_state(pci); 2101 pci_save_state(pci);
2102 pci_set_power_state(pci, pci_choose_state(pci, state)); 2102 pci_set_power_state(pci, PCI_D3hot);
2103 2103
2104 return 0; 2104 return 0;
2105} 2105}
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c
index d6c54b524bfa..9d1231dc4ae2 100644
--- a/sound/pci/ctxfi/cthw20k2.c
+++ b/sound/pci/ctxfi/cthw20k2.c
@@ -2202,7 +2202,7 @@ static int hw_card_init(struct hw *hw, struct card_conf *info)
2202} 2202}
2203 2203
2204#ifdef CONFIG_PM 2204#ifdef CONFIG_PM
2205static int hw_suspend(struct hw *hw, pm_message_t state) 2205static int hw_suspend(struct hw *hw)
2206{ 2206{
2207 struct pci_dev *pci = hw->pci; 2207 struct pci_dev *pci = hw->pci;
2208 2208
@@ -2210,7 +2210,7 @@ static int hw_suspend(struct hw *hw, pm_message_t state)
2210 2210
2211 pci_disable_device(pci); 2211 pci_disable_device(pci);
2212 pci_save_state(pci); 2212 pci_save_state(pci);
2213 pci_set_power_state(pci, pci_choose_state(pci, state)); 2213 pci_set_power_state(pci, PCI_D3hot);
2214 2214
2215 return 0; 2215 return 0;
2216} 2216}
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);