summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2016-12-31 19:56:26 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2017-02-07 16:56:17 +1100
commit06d7e99408acd2faa099d8af1a57cb1f6624062a (patch)
tree5c2aef0c19b278c9a5ee79889fdca0eb3816fddc /drivers/macintosh
parent523717d1496c794e8380d0e3de5ca6a8c1887dab (diff)
downloadop-kernel-dev-06d7e99408acd2faa099d8af1a57cb1f6624062a.zip
op-kernel-dev-06d7e99408acd2faa099d8af1a57cb1f6624062a.tar.gz
via-cuda: Remove redundant temporary variable
There is no possibility that current_req can change during execution of cuda_start(). This can be confirmed by inspection: cuda_lock is always held whenever cuda_start() is called or current_req is modified. Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/via-cuda.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c
index 0617512..dd51df5 100644
--- a/drivers/macintosh/via-cuda.c
+++ b/drivers/macintosh/via-cuda.c
@@ -414,19 +414,15 @@ cuda_write(struct adb_request *req)
static void
cuda_start(void)
{
- struct adb_request *req;
-
/* assert cuda_state == idle */
- /* get the packet to send */
- req = current_req;
- if (req == 0)
+ if (current_req == NULL)
return;
if ((in_8(&via[B]) & TREQ) == 0)
return; /* a byte is coming in from the CUDA */
/* set the shift register to shift out and send a byte */
out_8(&via[ACR], in_8(&via[ACR]) | SR_OUT);
- out_8(&via[SR], req->data[0]);
+ out_8(&via[SR], current_req->data[0]);
out_8(&via[B], in_8(&via[B]) & ~TIP);
cuda_state = sent_first_byte;
}
OpenPOWER on IntegriCloud