Re: [patch 2/3] drivers/char/hw_random.c: replace direct assignmentwith set_current_state()

From: Jeff Garzik
Date: Fri May 13 2005 - 19:39:12 EST


domen@xxxxxxxxxxxx wrote:
From: Christophe Lucas <clucas@xxxxxxxxxxxxx>



Use set_current_state() instead of direct assignment of
current->state.

Signed-off-by: Christophe Lucas <clucas@xxxxxxxxxxxxx>
Signed-off-by: Domen Puncer <domen@xxxxxxxxxxxx>


---
hw_random.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

Index: quilt/drivers/char/hw_random.c
===================================================================
--- quilt.orig/drivers/char/hw_random.c
+++ quilt/drivers/char/hw_random.c
@@ -514,7 +514,7 @@ static ssize_t rng_dev_read (struct file
if(need_resched())
{
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);

full barriers and such don't seem needed.

Also, make sure to send driver patches to the driver author (me).

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/