Commit 47fd2060 authored by Finn Thain's avatar Finn Thain Committed by Michael Ellerman

macintosh/via-macii, macintosh/adb-iop: Clean up whitespace

Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 351e5ad3
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <asm/macintosh.h> #include <asm/macintosh.h>
#include <asm/macints.h> #include <asm/macints.h>
#include <asm/mac_iop.h> #include <asm/mac_iop.h>
#include <asm/mac_oss.h> #include <asm/mac_oss.h>
#include <asm/adb_iop.h> #include <asm/adb_iop.h>
#include <linux/adb.h> #include <linux/adb.h>
/*#define DEBUG_ADB_IOP*/ /*#define DEBUG_ADB_IOP*/
...@@ -38,9 +38,9 @@ static unsigned char *reply_ptr; ...@@ -38,9 +38,9 @@ static unsigned char *reply_ptr;
#endif #endif
static enum adb_iop_state { static enum adb_iop_state {
idle, idle,
sending, sending,
awaiting_reply awaiting_reply
} adb_iop_state; } adb_iop_state;
static void adb_iop_start(void); static void adb_iop_start(void);
...@@ -66,7 +66,8 @@ static void adb_iop_end_req(struct adb_request *req, int state) ...@@ -66,7 +66,8 @@ static void adb_iop_end_req(struct adb_request *req, int state)
{ {
req->complete = 1; req->complete = 1;
current_req = req->next; current_req = req->next;
if (req->done) (*req->done)(req); if (req->done)
(*req->done)(req);
adb_iop_state = state; adb_iop_state = state;
} }
...@@ -100,7 +101,7 @@ static void adb_iop_complete(struct iop_msg *msg) ...@@ -100,7 +101,7 @@ static void adb_iop_complete(struct iop_msg *msg)
static void adb_iop_listen(struct iop_msg *msg) static void adb_iop_listen(struct iop_msg *msg)
{ {
struct adb_iopmsg *amsg = (struct adb_iopmsg *) msg->message; struct adb_iopmsg *amsg = (struct adb_iopmsg *)msg->message;
struct adb_request *req; struct adb_request *req;
unsigned long flags; unsigned long flags;
#ifdef DEBUG_ADB_IOP #ifdef DEBUG_ADB_IOP
...@@ -113,9 +114,9 @@ static void adb_iop_listen(struct iop_msg *msg) ...@@ -113,9 +114,9 @@ static void adb_iop_listen(struct iop_msg *msg)
#ifdef DEBUG_ADB_IOP #ifdef DEBUG_ADB_IOP
printk("adb_iop_listen %p: rcvd packet, %d bytes: %02X %02X", req, printk("adb_iop_listen %p: rcvd packet, %d bytes: %02X %02X", req,
(uint) amsg->count + 2, (uint) amsg->flags, (uint) amsg->cmd); (uint)amsg->count + 2, (uint)amsg->flags, (uint)amsg->cmd);
for (i = 0; i < amsg->count; i++) for (i = 0; i < amsg->count; i++)
printk(" %02X", (uint) amsg->data[i]); printk(" %02X", (uint)amsg->data[i]);
printk("\n"); printk("\n");
#endif #endif
...@@ -168,14 +169,15 @@ static void adb_iop_start(void) ...@@ -168,14 +169,15 @@ static void adb_iop_start(void)
/* get the packet to send */ /* get the packet to send */
req = current_req; req = current_req;
if (!req) return; if (!req)
return;
local_irq_save(flags); local_irq_save(flags);
#ifdef DEBUG_ADB_IOP #ifdef DEBUG_ADB_IOP
printk("adb_iop_start %p: sending packet, %d bytes:", req, req->nbytes); printk("adb_iop_start %p: sending packet, %d bytes:", req, req->nbytes);
for (i = 0 ; i < req->nbytes ; i++) for (i = 0; i < req->nbytes; i++)
printk(" %02X", (uint) req->data[i]); printk(" %02X", (uint)req->data[i]);
printk("\n"); printk("\n");
#endif #endif
...@@ -196,13 +198,14 @@ static void adb_iop_start(void) ...@@ -196,13 +198,14 @@ static void adb_iop_start(void)
/* Now send it. The IOP manager will call adb_iop_complete */ /* Now send it. The IOP manager will call adb_iop_complete */
/* when the packet has been sent. */ /* when the packet has been sent. */
iop_send_message(ADB_IOP, ADB_CHAN, req, iop_send_message(ADB_IOP, ADB_CHAN, req, sizeof(amsg), (__u8 *)&amsg,
sizeof(amsg), (__u8 *) &amsg, adb_iop_complete); adb_iop_complete);
} }
int adb_iop_probe(void) int adb_iop_probe(void)
{ {
if (!iop_ism_present) return -ENODEV; if (!iop_ism_present)
return -ENODEV;
return 0; return 0;
} }
...@@ -218,10 +221,12 @@ int adb_iop_send_request(struct adb_request *req, int sync) ...@@ -218,10 +221,12 @@ int adb_iop_send_request(struct adb_request *req, int sync)
int err; int err;
err = adb_iop_write(req); err = adb_iop_write(req);
if (err) return err; if (err)
return err;
if (sync) { if (sync) {
while (!req->complete) adb_iop_poll(); while (!req->complete)
adb_iop_poll();
} }
return 0; return 0;
} }
...@@ -251,7 +256,9 @@ static int adb_iop_write(struct adb_request *req) ...@@ -251,7 +256,9 @@ static int adb_iop_write(struct adb_request *req)
} }
local_irq_restore(flags); local_irq_restore(flags);
if (adb_iop_state == idle) adb_iop_start();
if (adb_iop_state == idle)
adb_iop_start();
return 0; return 0;
} }
...@@ -263,7 +270,8 @@ int adb_iop_autopoll(int devs) ...@@ -263,7 +270,8 @@ int adb_iop_autopoll(int devs)
void adb_iop_poll(void) void adb_iop_poll(void)
{ {
if (adb_iop_state == idle) adb_iop_start(); if (adb_iop_state == idle)
adb_iop_start();
iop_ism_irq_poll(ADB_IOP); iop_ism_irq_poll(ADB_IOP);
} }
......
This diff is collapsed.
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