sound/oss: use current->state helpers

Call __set_current_state() instead of assigning the new state directly.
These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping
track of who changed the state.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Davidlohr Bueso 2015-01-14 23:11:43 -08:00 коммит произвёл Takashi Iwai
Родитель 7b617289b6
Коммит fd4e8dde42
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -675,7 +675,7 @@ static void dsp_write_flush(void)
timeout); timeout);
clear_bit(F_WRITEFLUSH, &dev.flags); clear_bit(F_WRITEFLUSH, &dev.flags);
if (!signal_pending(current)) { if (!signal_pending(current)) {
current->state = TASK_INTERRUPTIBLE; __set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(get_play_delay_jiffies(DAP_BUFF_SIZE)); schedule_timeout(get_play_delay_jiffies(DAP_BUFF_SIZE));
} }
clear_bit(F_WRITING, &dev.flags); clear_bit(F_WRITING, &dev.flags);
@ -1288,7 +1288,7 @@ static int __init calibrate_adc(WORD srate)
& ~0x0001, dev.SMA + SMA_wCurrHostStatusFlags); & ~0x0001, dev.SMA + SMA_wCurrHostStatusFlags);
if (msnd_send_word(&dev, 0, 0, HDEXAR_CAL_A_TO_D) == 0 && if (msnd_send_word(&dev, 0, 0, HDEXAR_CAL_A_TO_D) == 0 &&
chk_send_dsp_cmd(&dev, HDEX_AUX_REQ) == 0) { chk_send_dsp_cmd(&dev, HDEX_AUX_REQ) == 0) {
current->state = TASK_INTERRUPTIBLE; __set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ / 3); schedule_timeout(HZ / 3);
return 0; return 0;
} }

Просмотреть файл

@ -1654,7 +1654,7 @@ static int drain_dac(struct cs4297a_state *s, int nonblock)
s->dma_dac.hwptr = s->dma_dac.swptr = hwptr; s->dma_dac.hwptr = s->dma_dac.swptr = hwptr;
spin_unlock_irqrestore(&s->lock, flags); spin_unlock_irqrestore(&s->lock, flags);
remove_wait_queue(&s->dma_dac.wait, &wait); remove_wait_queue(&s->dma_dac.wait, &wait);
current->state = TASK_RUNNING; __set_current_state(TASK_RUNNING);
return 0; return 0;
} }