diff options
author | Mike Rapoport <mike@compulab.co.il> | 2009-07-29 04:59:23 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-09-10 07:15:37 -0400 |
commit | 2ba9fd0d15c088aae31ec0d672153610212e9e34 (patch) | |
tree | 6bbdf1e9ca1ac2163feaa8c8be43fe2f5c17cadb /sound/arm | |
parent | 4f3edfe386da66558577fa636e4b33696497743e (diff) |
[ARM] pxa: update pxa2xx-ac97.c to use 'struct dev_pm_ops'
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'sound/arm')
-rw-r--r-- | sound/arm/pxa2xx-ac97.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index c570ebd9d177..9c12563db1c4 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c | |||
@@ -137,9 +137,9 @@ static int pxa2xx_ac97_do_resume(struct snd_card *card) | |||
137 | return 0; | 137 | return 0; |
138 | } | 138 | } |
139 | 139 | ||
140 | static int pxa2xx_ac97_suspend(struct platform_device *dev, pm_message_t state) | 140 | static int pxa2xx_ac97_suspend(struct device *dev) |
141 | { | 141 | { |
142 | struct snd_card *card = platform_get_drvdata(dev); | 142 | struct snd_card *card = dev_get_drvdata(dev); |
143 | int ret = 0; | 143 | int ret = 0; |
144 | 144 | ||
145 | if (card) | 145 | if (card) |
@@ -148,9 +148,9 @@ static int pxa2xx_ac97_suspend(struct platform_device *dev, pm_message_t state) | |||
148 | return ret; | 148 | return ret; |
149 | } | 149 | } |
150 | 150 | ||
151 | static int pxa2xx_ac97_resume(struct platform_device *dev) | 151 | static int pxa2xx_ac97_resume(struct device *dev) |
152 | { | 152 | { |
153 | struct snd_card *card = platform_get_drvdata(dev); | 153 | struct snd_card *card = dev_get_drvdata(dev); |
154 | int ret = 0; | 154 | int ret = 0; |
155 | 155 | ||
156 | if (card) | 156 | if (card) |
@@ -159,9 +159,10 @@ static int pxa2xx_ac97_resume(struct platform_device *dev) | |||
159 | return ret; | 159 | return ret; |
160 | } | 160 | } |
161 | 161 | ||
162 | #else | 162 | static struct dev_pm_ops pxa2xx_ac97_pm_ops = { |
163 | #define pxa2xx_ac97_suspend NULL | 163 | .suspend = pxa2xx_ac97_suspend, |
164 | #define pxa2xx_ac97_resume NULL | 164 | .resume = pxa2xx_ac97_resume, |
165 | }; | ||
165 | #endif | 166 | #endif |
166 | 167 | ||
167 | static int __devinit pxa2xx_ac97_probe(struct platform_device *dev) | 168 | static int __devinit pxa2xx_ac97_probe(struct platform_device *dev) |
@@ -231,11 +232,12 @@ static int __devexit pxa2xx_ac97_remove(struct platform_device *dev) | |||
231 | static struct platform_driver pxa2xx_ac97_driver = { | 232 | static struct platform_driver pxa2xx_ac97_driver = { |
232 | .probe = pxa2xx_ac97_probe, | 233 | .probe = pxa2xx_ac97_probe, |
233 | .remove = __devexit_p(pxa2xx_ac97_remove), | 234 | .remove = __devexit_p(pxa2xx_ac97_remove), |
234 | .suspend = pxa2xx_ac97_suspend, | ||
235 | .resume = pxa2xx_ac97_resume, | ||
236 | .driver = { | 235 | .driver = { |
237 | .name = "pxa2xx-ac97", | 236 | .name = "pxa2xx-ac97", |
238 | .owner = THIS_MODULE, | 237 | .owner = THIS_MODULE, |
238 | #ifdef CONFIG_PM | ||
239 | .pm = &pxa2xx_ac97_pm_ops, | ||
240 | #endif | ||
239 | }, | 241 | }, |
240 | }; | 242 | }; |
241 | 243 | ||