Skip to content

Commit

Permalink
staging/rts_pstor: fix Polling thread wakeups CPU
Browse files Browse the repository at this point in the history
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 <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Cho, Yu-Chen authored and Greg Kroah-Hartman committed May 3, 2011
1 parent 56aec66 commit da548cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/staging/rts_pstor/rtsx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit da548cb

Please sign in to comment.