From: "Cho, Yu-Chen" <acho@novell.com>
To: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
gregkh@suse.de, wei_wang@realsil.com.cn
Cc: segoon@openwall.com, a.beregalov@gmail.com, jlee@novell.com,
acho@novell.com
Subject: [PATCH] staging/rts_pstor: fix Polling thread wakeups CPU
Date: Tue, 3 May 2011 17:53:35 +0800 [thread overview]
Message-ID: <ef04e68f674a4175dccdb7f4cf04f419199051b6.1304415652.git.acho@novell.com> (raw)
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>
---
drivers/staging/rts_pstor/rtsx.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/rts_pstor/rtsx.c b/drivers/staging/rts_pstor/rtsx.c
index 02525d5..5ff59f2 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));
--
1.7.1
reply other threads:[~2011-05-03 9:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef04e68f674a4175dccdb7f4cf04f419199051b6.1304415652.git.acho@novell.com \
--to=acho@novell.com \
--cc=a.beregalov@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=jlee@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=segoon@openwall.com \
--cc=wei_wang@realsil.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®