sound/rawmidi: replace schedule_timeout() with
Subsystems (2)
PATCH 29/39 sound/rawmidi: replace schedule_timeout() with
Hi,
Please consider applying.
Description: Use msleep instead of schedule_timeout() to guarantee the task delays as expected. This also removes a dependence on the value of HZ.
Signed-off-by Nishanth Aravamudan <[email protected]>
sound/core/rawmidi.c +3 -4
@@ -29,6 +29,7 @@#include <linux/time.h> #include <linux/wait.h> #include <linux/moduleparam.h> +#include <linux/delay.h> #include <sound/rawmidi.h> #include <sound/info.h> #include <sound/control.h>
@@ -149,10 +150,8 @@ int snd_rawmidi_drain_output(snd_rawmidi/* we need wait a while to make sure that Tx FIFOs are empty */ if (substream->ops->drain) substream->ops->drain (substream); -else { -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /20 ); - } +else +msleep (50 );snd_rawmidi_drop_output (substream); }return err;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors