diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2013-12-03 05:04:26 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-12-03 11:43:42 -0500 |
commit | b13a714923fe4d444977dccb7a0f7ad1346724cf (patch) | |
tree | 412a1d96ce5a3ec72316c856a0f8720f8f0bec7e /sound/arm | |
parent | 84d2dc3e57bea30fb31397861cb97547069b25e4 (diff) |
ALSA: AACI: Convert to modern PM ops
Even if the CONFIG_PM explicity is undefined, let's convert to the
modern PM ops.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/arm')
-rw-r--r-- | sound/arm/aaci.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 1ca8dc2ccb89..c421fdb3c7a1 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -753,7 +753,7 @@ static struct snd_pcm_ops aaci_capture_ops = { | |||
753 | * Power Management. | 753 | * Power Management. |
754 | */ | 754 | */ |
755 | #ifdef CONFIG_PM | 755 | #ifdef CONFIG_PM |
756 | static int aaci_do_suspend(struct snd_card *card, unsigned int state) | 756 | static int aaci_do_suspend(struct snd_card *card) |
757 | { | 757 | { |
758 | struct aaci *aaci = card->private_data; | 758 | struct aaci *aaci = card->private_data; |
759 | snd_power_change_state(card, SNDRV_CTL_POWER_D3cold); | 759 | snd_power_change_state(card, SNDRV_CTL_POWER_D3cold); |
@@ -761,28 +761,28 @@ static int aaci_do_suspend(struct snd_card *card, unsigned int state) | |||
761 | return 0; | 761 | return 0; |
762 | } | 762 | } |
763 | 763 | ||
764 | static int aaci_do_resume(struct snd_card *card, unsigned int state) | 764 | static int aaci_do_resume(struct snd_card *card) |
765 | { | 765 | { |
766 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | 766 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
767 | return 0; | 767 | return 0; |
768 | } | 768 | } |
769 | 769 | ||
770 | static int aaci_suspend(struct amba_device *dev, pm_message_t state) | 770 | static int aaci_suspend(struct device *dev) |
771 | { | 771 | { |
772 | struct snd_card *card = amba_get_drvdata(dev); | 772 | struct snd_card *card = dev_get_drvdata(dev); |
773 | return card ? aaci_do_suspend(card) : 0; | 773 | return card ? aaci_do_suspend(card) : 0; |
774 | } | 774 | } |
775 | 775 | ||
776 | static int aaci_resume(struct amba_device *dev) | 776 | static int aaci_resume(struct device *dev) |
777 | { | 777 | { |
778 | struct snd_card *card = amba_get_drvdata(dev); | 778 | struct snd_card *card = dev_get_drvdata(dev); |
779 | return card ? aaci_do_resume(card) : 0; | 779 | return card ? aaci_do_resume(card) : 0; |
780 | } | 780 | } |
781 | |||
782 | static SIMPLE_DEV_PM_OPS(aaci_dev_pm_ops, aaci_suspend, aaci_resume); | ||
783 | #define AACI_DEV_PM_OPS (&aaci_dev_pm_ops) | ||
781 | #else | 784 | #else |
782 | #define aaci_do_suspend NULL | 785 | #define AACI_DEV_PM_OPS NULL |
783 | #define aaci_do_resume NULL | ||
784 | #define aaci_suspend NULL | ||
785 | #define aaci_resume NULL | ||
786 | #endif | 786 | #endif |
787 | 787 | ||
788 | 788 | ||
@@ -1100,11 +1100,10 @@ MODULE_DEVICE_TABLE(amba, aaci_ids); | |||
1100 | static struct amba_driver aaci_driver = { | 1100 | static struct amba_driver aaci_driver = { |
1101 | .drv = { | 1101 | .drv = { |
1102 | .name = DRIVER_NAME, | 1102 | .name = DRIVER_NAME, |
1103 | .pm = AACI_DEV_PM_OPS, | ||
1103 | }, | 1104 | }, |
1104 | .probe = aaci_probe, | 1105 | .probe = aaci_probe, |
1105 | .remove = aaci_remove, | 1106 | .remove = aaci_remove, |
1106 | .suspend = aaci_suspend, | ||
1107 | .resume = aaci_resume, | ||
1108 | .id_table = aaci_ids, | 1107 | .id_table = aaci_ids, |
1109 | }; | 1108 | }; |
1110 | 1109 | ||