irda/sir_dev: replace schedule_timeout() with msleep()
Subsystems (2)
PATCH 4/8 irda/sir_dev: replace schedule_timeout() with msleep()
I would appreciate any comments from the janitor@sternweltens list.
Description: Replace schedule_timeout() with msleep() to guarantee the task delays for the desired time.
Signed-off-by Nishanth Aravamudan <[email protected]>
Signed-off-by Maximilian Attems <[email protected]>
---
linux-2.6.9-rc1-bk7-max/drivers/net/irda/sir_dev.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/irda/sir_dev.c renamed from drivers/net/irda/sir_dev.c~msleep-drivers_net_irda_sir_dev +2 -2
@@ -15,6 +15,7 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/smp_lock.h> +#include <linux/delay.h> #include <net/irda/irda.h> #include <net/irda/wrapper.h>
@@ -73,8 +74,7 @@ int sirdev_raw_write(struct sir_dev *devspin_lock_irqsave (&dev->tx_lock, flags);/* serialize with other tx operations */ while (dev->tx_buff.len >0 ) {/* wait until tx idle */ spin_unlock_irqrestore (&dev->tx_lock, flags); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (msecs_to_jiffies (10 )); +msleep (10 );spin_lock_irqsave (&dev->tx_lock, flags); }
_