Commit 4e3f87f6 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fix OSS opl3sa2 compilation

From: Zwane Mwaikambo <zwane@linuxpower.ca>

There was a 2.4 merge from Alan Cox, but a few #ifdef's got shuffled around
in the process, resulting in a broken build for !CONFIG_PM
parent 30b85a5c
...@@ -353,7 +353,8 @@ static void opl3sa2_mixer_reset(opl3sa2_state_t* devc) ...@@ -353,7 +353,8 @@ static void opl3sa2_mixer_reset(opl3sa2_state_t* devc)
} }
} }
/* Currently only used for power management */
#ifdef CONFIG_PM
static void opl3sa2_mixer_restore(opl3sa2_state_t* devc) static void opl3sa2_mixer_restore(opl3sa2_state_t* devc)
{ {
if (devc) { if (devc) {
...@@ -366,7 +367,7 @@ static void opl3sa2_mixer_restore(opl3sa2_state_t* devc) ...@@ -366,7 +367,7 @@ static void opl3sa2_mixer_restore(opl3sa2_state_t* devc)
} }
} }
} }
#endif
static inline void arg_to_vol_mono(unsigned int vol, int* value) static inline void arg_to_vol_mono(unsigned int vol, int* value)
{ {
...@@ -961,7 +962,6 @@ static int opl3sa2_resume(struct pm_dev *pdev) ...@@ -961,7 +962,6 @@ static int opl3sa2_resume(struct pm_dev *pdev)
spin_unlock_irqrestore(&opl3sa2_lock,flags); spin_unlock_irqrestore(&opl3sa2_lock,flags);
return 0; return 0;
} }
#endif /* CONFIG_PM */
static int opl3sa2_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data) static int opl3sa2_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data)
{ {
...@@ -976,6 +976,7 @@ static int opl3sa2_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *dat ...@@ -976,6 +976,7 @@ static int opl3sa2_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *dat
} }
return 0; return 0;
} }
#endif /* CONFIG_PM */
/* /*
* Install OPL3-SA2 based card(s). * Install OPL3-SA2 based card(s).
...@@ -1127,10 +1128,11 @@ static void __exit cleanup_opl3sa2(void) ...@@ -1127,10 +1128,11 @@ static void __exit cleanup_opl3sa2(void)
int card; int card;
for(card = 0; card < opl3sa2_cards_num; card++) { for(card = 0; card < opl3sa2_cards_num; card++) {
#ifdef CONFIG_PM
if (opl3sa2_state[card].pmdev) if (opl3sa2_state[card].pmdev)
pm_unregister(opl3sa2_state[card].pmdev); pm_unregister(opl3sa2_state[card].pmdev);
#endif
if(opl3sa2_state[card].cfg_mpu.slots[1] != -1) { if (opl3sa2_state[card].cfg_mpu.slots[1] != -1) {
unload_opl3sa2_mpu(&opl3sa2_state[card].cfg_mpu); unload_opl3sa2_mpu(&opl3sa2_state[card].cfg_mpu);
} }
unload_opl3sa2_mss(&opl3sa2_state[card].cfg_mss); unload_opl3sa2_mss(&opl3sa2_state[card].cfg_mss);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment