From: Cho, Yu-Chen Date: Tue, 3 May 2011 09:53:35 +0000 (+0800) Subject: staging/rts_pstor: fix Polling thread wakeups CPU X-Git-Tag: v3.0-rc1~336^2~531 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=da548cb3f1ec3b1fd4ec2a848401398462ce3124;p=karo-tx-linux.git staging/rts_pstor: fix Polling thread wakeups CPU RealTek PCI-E Card Reader rts_pstor driver causes CPU wakeup very frequently, thatt's bad for power consumption. Signed-off-by: Cho, Yu-Chen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rts_pstor/rtsx.c b/drivers/staging/rts_pstor/rtsx.c index 02525d57ba83..5ff59f27d101 100644 --- a/drivers/staging/rts_pstor/rtsx.c +++ b/drivers/staging/rts_pstor/rtsx.c @@ -594,7 +594,9 @@ static int rtsx_polling_thread(void *__dev) wait_timeout((delay_use + 5) * 1000); for (;;) { - wait_timeout(POLLING_INTERVAL); + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(POLLING_INTERVAL); /* lock the device pointers */ mutex_lock(&(dev->dev_mutex));