Skip to content

Commit fd4e8dd

Browse files
Davidlohr Buesotiwai
authored andcommitted
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 7b61728 commit fd4e8dd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sound/oss/msnd_pinnacle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ static void dsp_write_flush(void)
675675
timeout);
676676
clear_bit(F_WRITEFLUSH, &dev.flags);
677677
if (!signal_pending(current)) {
678-
current->state = TASK_INTERRUPTIBLE;
678+
__set_current_state(TASK_INTERRUPTIBLE);
679679
schedule_timeout(get_play_delay_jiffies(DAP_BUFF_SIZE));
680680
}
681681
clear_bit(F_WRITING, &dev.flags);
@@ -1288,7 +1288,7 @@ static int __init calibrate_adc(WORD srate)
12881288
& ~0x0001, dev.SMA + SMA_wCurrHostStatusFlags);
12891289
if (msnd_send_word(&dev, 0, 0, HDEXAR_CAL_A_TO_D) == 0 &&
12901290
chk_send_dsp_cmd(&dev, HDEX_AUX_REQ) == 0) {
1291-
current->state = TASK_INTERRUPTIBLE;
1291+
__set_current_state(TASK_INTERRUPTIBLE);
12921292
schedule_timeout(HZ / 3);
12931293
return 0;
12941294
}

sound/oss/swarm_cs4297a.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,7 @@ static int drain_dac(struct cs4297a_state *s, int nonblock)
16541654
s->dma_dac.hwptr = s->dma_dac.swptr = hwptr;
16551655
spin_unlock_irqrestore(&s->lock, flags);
16561656
remove_wait_queue(&s->dma_dac.wait, &wait);
1657-
current->state = TASK_RUNNING;
1657+
__set_current_state(TASK_RUNNING);
16581658
return 0;
16591659
}
16601660

0 commit comments

Comments
 (0)