summaryrefslogtreecommitdiff
path: root/drivers/memstick/core/memstick.c
diff options
context:
space:
mode:
authorAlex Dubov <oakad@yahoo.com>2008-07-25 19:45:02 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-26 12:00:04 -0700
commitf1d82698029b92a88f5500b99f66514b6dee2bc3 (patch)
treeeaedb613a05e1471fbeca212b3b1229ab252627d /drivers/memstick/core/memstick.c
parent17017d8d2c005734d7088d8281ce2daab8fcb097 (diff)
memstick: use fully asynchronous request processing
Instead of using a separate thread to pump requests from block layer queue to memstick, do so inline, utilizing the callback design of the memstick. [akpm@linux-foundation.org: fix warnings] Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/memstick/core/memstick.c')
-rw-r--r--drivers/memstick/core/memstick.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c
index 7162f772bbfb..a38005008a20 100644
--- a/drivers/memstick/core/memstick.c
+++ b/drivers/memstick/core/memstick.c
@@ -249,8 +249,11 @@ EXPORT_SYMBOL(memstick_next_req);
*/
void memstick_new_req(struct memstick_host *host)
{
- host->retries = cmd_retries;
- host->request(host);
+ if (host->card) {
+ host->retries = cmd_retries;
+ INIT_COMPLETION(host->card->mrq_complete);
+ host->request(host);
+ }
}
EXPORT_SYMBOL(memstick_new_req);