aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/tlv320dac33.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index f7a6ce7e5fb1..6822ac1c25b0 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -90,7 +90,6 @@ static const char *dac33_supply_names[DAC33_NUM_SUPPLIES] = {
90 90
91struct tlv320dac33_priv { 91struct tlv320dac33_priv {
92 struct mutex mutex; 92 struct mutex mutex;
93 struct workqueue_struct *dac33_wq;
94 struct work_struct work; 93 struct work_struct work;
95 struct snd_soc_codec *codec; 94 struct snd_soc_codec *codec;
96 struct regulator_bulk_data supplies[DAC33_NUM_SUPPLIES]; 95 struct regulator_bulk_data supplies[DAC33_NUM_SUPPLIES];
@@ -771,7 +770,7 @@ static irqreturn_t dac33_interrupt_handler(int irq, void *dev)
771 770
772 /* Do not schedule the workqueue in Mode7 */ 771 /* Do not schedule the workqueue in Mode7 */
773 if (dac33->fifo_mode != DAC33_FIFO_MODE7) 772 if (dac33->fifo_mode != DAC33_FIFO_MODE7)
774 queue_work(dac33->dac33_wq, &dac33->work); 773 schedule_work(&dac33->work);
775 774
776 return IRQ_HANDLED; 775 return IRQ_HANDLED;
777} 776}
@@ -1127,7 +1126,7 @@ static int dac33_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
1127 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 1126 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
1128 if (dac33->fifo_mode) { 1127 if (dac33->fifo_mode) {
1129 dac33->state = DAC33_PREFILL; 1128 dac33->state = DAC33_PREFILL;
1130 queue_work(dac33->dac33_wq, &dac33->work); 1129 schedule_work(&dac33->work);
1131 } 1130 }
1132 break; 1131 break;
1133 case SNDRV_PCM_TRIGGER_STOP: 1132 case SNDRV_PCM_TRIGGER_STOP:
@@ -1135,7 +1134,7 @@ static int dac33_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
1135 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 1134 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
1136 if (dac33->fifo_mode) { 1135 if (dac33->fifo_mode) {
1137 dac33->state = DAC33_FLUSH; 1136 dac33->state = DAC33_FLUSH;
1138 queue_work(dac33->dac33_wq, &dac33->work); 1137 schedule_work(&dac33->work);
1139 } 1138 }
1140 break; 1139 break;
1141 default: 1140 default:
@@ -1410,14 +1409,6 @@ static int dac33_soc_probe(struct snd_soc_codec *codec)
1410 dac33->irq = -1; 1409 dac33->irq = -1;
1411 } 1410 }
1412 if (dac33->irq != -1) { 1411 if (dac33->irq != -1) {
1413 /* Setup work queue */
1414 dac33->dac33_wq =
1415 create_singlethread_workqueue("tlv320dac33");
1416 if (dac33->dac33_wq == NULL) {
1417 free_irq(dac33->irq, codec);
1418 return -ENOMEM;
1419 }
1420
1421 INIT_WORK(&dac33->work, dac33_work); 1412 INIT_WORK(&dac33->work, dac33_work);
1422 } 1413 }
1423 } 1414 }
@@ -1437,7 +1428,7 @@ static int dac33_soc_remove(struct snd_soc_codec *codec)
1437 1428
1438 if (dac33->irq >= 0) { 1429 if (dac33->irq >= 0) {
1439 free_irq(dac33->irq, dac33->codec); 1430 free_irq(dac33->irq, dac33->codec);
1440 destroy_workqueue(dac33->dac33_wq); 1431 flush_work(&dac33->work);
1441 } 1432 }
1442 return 0; 1433 return 0;
1443} 1434}