aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/opl3sa2.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-13 19:06:25 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 21:14:10 -0500
commitbca73e4bf8563d83f7856164caa44d5f42e44cca (patch)
treeea8c50adca509c8012aed715d578b6c927f9e284 /sound/oss/opl3sa2.c
parent95e861db3eaba7bc99f8605db70103ec3d078203 (diff)
[PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h
Since few people need the support anymore, this moves the legacy pm_xxx functions to CONFIG_PM_LEGACY, and include/linux/pm_legacy.h. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/oss/opl3sa2.c')
-rw-r--r--sound/oss/opl3sa2.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/oss/opl3sa2.c b/sound/oss/opl3sa2.c
index 2efbd865109b..cd41d0e4706a 100644
--- a/sound/oss/opl3sa2.c
+++ b/sound/oss/opl3sa2.c
@@ -70,6 +70,7 @@
70#include <linux/module.h> 70#include <linux/module.h>
71#include <linux/delay.h> 71#include <linux/delay.h>
72#include <linux/pm.h> 72#include <linux/pm.h>
73#include <linux/pm_legacy.h>
73#include "sound_config.h" 74#include "sound_config.h"
74 75
75#include "ad1848.h" 76#include "ad1848.h"
@@ -138,7 +139,7 @@ typedef struct {
138 struct pnp_dev* pdev; 139 struct pnp_dev* pdev;
139 int activated; /* Whether said devices have been activated */ 140 int activated; /* Whether said devices have been activated */
140#endif 141#endif
141#ifdef CONFIG_PM 142#ifdef CONFIG_PM_LEGACY
142 unsigned int in_suspend; 143 unsigned int in_suspend;
143 struct pm_dev *pmdev; 144 struct pm_dev *pmdev;
144#endif 145#endif
@@ -341,7 +342,7 @@ static void opl3sa2_mixer_reset(opl3sa2_state_t* devc)
341} 342}
342 343
343/* Currently only used for power management */ 344/* Currently only used for power management */
344#ifdef CONFIG_PM 345#ifdef CONFIG_PM_LEGACY
345static void opl3sa2_mixer_restore(opl3sa2_state_t* devc) 346static void opl3sa2_mixer_restore(opl3sa2_state_t* devc)
346{ 347{
347 if (devc) { 348 if (devc) {
@@ -354,7 +355,7 @@ static void opl3sa2_mixer_restore(opl3sa2_state_t* devc)
354 } 355 }
355 } 356 }
356} 357}
357#endif 358#endif /* CONFIG_PM_LEGACY */
358 359
359static inline void arg_to_vol_mono(unsigned int vol, int* value) 360static inline void arg_to_vol_mono(unsigned int vol, int* value)
360{ 361{
@@ -831,7 +832,8 @@ static struct pnp_driver opl3sa2_driver = {
831 832
832/* End of component functions */ 833/* End of component functions */
833 834
834#ifdef CONFIG_PM 835#ifdef CONFIG_PM_LEGACY
836
835static DEFINE_SPINLOCK(opl3sa2_lock); 837static DEFINE_SPINLOCK(opl3sa2_lock);
836 838
837/* Power Management support functions */ 839/* Power Management support functions */
@@ -906,7 +908,7 @@ static int opl3sa2_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *dat
906 } 908 }
907 return 0; 909 return 0;
908} 910}
909#endif /* CONFIG_PM */ 911#endif /* CONFIG_PM_LEGACY */
910 912
911/* 913/*
912 * Install OPL3-SA2 based card(s). 914 * Install OPL3-SA2 based card(s).
@@ -1019,12 +1021,12 @@ static int __init init_opl3sa2(void)
1019 1021
1020 /* ewww =) */ 1022 /* ewww =) */
1021 opl3sa2_state[card].card = card; 1023 opl3sa2_state[card].card = card;
1022#ifdef CONFIG_PM 1024#ifdef CONFIG_PM_LEGACY
1023 /* register our power management capabilities */ 1025 /* register our power management capabilities */
1024 opl3sa2_state[card].pmdev = pm_register(PM_ISA_DEV, card, opl3sa2_pm_callback); 1026 opl3sa2_state[card].pmdev = pm_register(PM_ISA_DEV, card, opl3sa2_pm_callback);
1025 if (opl3sa2_state[card].pmdev) 1027 if (opl3sa2_state[card].pmdev)
1026 opl3sa2_state[card].pmdev->data = &opl3sa2_state[card]; 1028 opl3sa2_state[card].pmdev->data = &opl3sa2_state[card];
1027#endif /* CONFIG_PM */ 1029#endif /* CONFIG_PM_LEGACY */
1028 1030
1029 /* 1031 /*
1030 * Set the Yamaha 3D enhancement mode (aka Ymersion) if asked to and 1032 * Set the Yamaha 3D enhancement mode (aka Ymersion) if asked to and
@@ -1081,7 +1083,7 @@ static void __exit cleanup_opl3sa2(void)
1081 int card; 1083 int card;
1082 1084
1083 for(card = 0; card < opl3sa2_cards_num; card++) { 1085 for(card = 0; card < opl3sa2_cards_num; card++) {
1084#ifdef CONFIG_PM 1086#ifdef CONFIG_PM_LEGACY
1085 if (opl3sa2_state[card].pmdev) 1087 if (opl3sa2_state[card].pmdev)
1086 pm_unregister(opl3sa2_state[card].pmdev); 1088 pm_unregister(opl3sa2_state[card].pmdev);
1087#endif 1089#endif