summaryrefslogtreecommitdiff
path: root/drivers/macintosh/adb-iop.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2020-05-31 09:17:03 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2020-07-26 23:34:24 +1000
commite2954e5f727fad126258e83259b513988973c166 (patch)
tree78bd47948fd0fc730d35695423d80af562d7a27c /drivers/macintosh/adb-iop.c
parent32226e81704398317e1cc5a82d24c0ef3cc25e5e (diff)
macintosh/adb-iop: Implement sending -> idle state transition
On leaving the 'sending' state, proceed to the 'idle' state if no reply is expected. Drop redundant test for adb_iop_state == sending && current_req. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/6991996dd4aaf0b52cfd650172bf0f6fbe37a452.1590880623.git.fthain@telegraphics.com.au
Diffstat (limited to 'drivers/macintosh/adb-iop.c')
-rw-r--r--drivers/macintosh/adb-iop.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/macintosh/adb-iop.c b/drivers/macintosh/adb-iop.c
index f22792c95d4f..8594e4f9a830 100644
--- a/drivers/macintosh/adb-iop.c
+++ b/drivers/macintosh/adb-iop.c
@@ -77,15 +77,14 @@ static void adb_iop_done(void)
static void adb_iop_complete(struct iop_msg *msg)
{
- struct adb_request *req;
unsigned long flags;
local_irq_save(flags);
- req = current_req;
- if ((adb_iop_state == sending) && req && req->reply_expected) {
+ if (current_req->reply_expected)
adb_iop_state = awaiting_reply;
- }
+ else
+ adb_iop_done();
local_irq_restore(flags);
}