Commit 75233d40 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] paride cleanup and fixes (9/25)

Equivalent transformation:
	do_pd_reqeust1() calls lambda-expanded, function killed.
	resulting call of ps_set_intr() in next_request() has been
	moved past dropping pd_lock.
parent df81a2ca
......@@ -742,8 +742,10 @@ static int pd_ready(void)
return !(status_reg(pd_current) & STAT_BUSY);
}
static void do_pd_request1(request_queue_t * q)
static void do_pd_request(request_queue_t * q)
{
if (pd_req)
return;
pd_req = elv_next_request(q);
if (!pd_req)
return;
......@@ -752,13 +754,6 @@ static void do_pd_request1(request_queue_t * q)
ps_set_intr();
}
static void do_pd_request(request_queue_t * q)
{
if (pd_req)
return;
do_pd_request1(q);
}
static int pd_next_buf(void)
{
unsigned long saved_flags;
......@@ -785,8 +780,15 @@ static inline void next_request(int success)
spin_lock_irqsave(&pd_lock, saved_flags);
end_request(pd_req, success);
do_pd_request1(pd_queue);
pd_req = elv_next_request(pd_queue);
if (!pd_req) {
spin_unlock_irqrestore(&pd_lock, saved_flags);
return;
}
spin_unlock_irqrestore(&pd_lock, saved_flags);
ps_continuation = do_pd_io;
ps_set_intr();
}
static void do_pd_io(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment