From 85429ee19d20a3ef91ec429a81f85cc47419ca9f Mon Sep 17 00:00:00 2001 From: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Date: Thu, 4 Nov 2004 21:39:29 -0800 Subject: [PATCH] [PATCH] w1/w1_family: replace schedule_timeout() with msleep_interruptible() Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com> --- drivers/w1/w1_family.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/w1/w1_family.c b/drivers/w1/w1_family.c index 78ee9a50247a..ccb23028e9c7 100644 --- a/drivers/w1/w1_family.c +++ b/drivers/w1/w1_family.c @@ -87,10 +87,8 @@ void w1_unregister_family(struct w1_family *fent) while (atomic_read(&fent->refcnt)) { printk(KERN_INFO "Waiting for family %u to become free: refcnt=%d.\n", fent->fid, atomic_read(&fent->refcnt)); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); - if (signal_pending(current)) + if (msleep_interruptible(1000)) flush_signals(current); } } -- 2.30.9